-
Notifications
You must be signed in to change notification settings - Fork 30
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
27 changed files
with
555 additions
and
118 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
import { makeJWT } from '../packages/client-node/__tests__/utils/jwt' | ||
|
||
/** Used to generate a JWT token for web testing (can't use `jsonwebtoken` library directly there) | ||
* See `package.json` -> `scripts` -> `test:web:integration:cloud_smt:jwt` */ | ||
;(() => { | ||
console.log(makeJWT()) | ||
})() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
const webpackConfig = require('./webpack.dev.js') | ||
|
||
const TEST_TIMEOUT_MS = 400_000 | ||
|
||
module.exports = function (config) { | ||
config.set({ | ||
// base path that will be used to resolve all patterns (e.g. files, exclude) | ||
basePath: '', | ||
frameworks: ['webpack', 'jasmine'], | ||
// list of files / patterns to load in the browser | ||
files: ['packages/client-web/__tests__/jwt/*.test.ts'], | ||
exclude: [], | ||
webpack: webpackConfig, | ||
preprocessors: { | ||
'packages/client-common/**/*.ts': ['webpack', 'sourcemap'], | ||
'packages/client-web/**/*.ts': ['webpack', 'sourcemap'], | ||
'packages/client-common/__tests__/jwt/*.ts': ['webpack', 'sourcemap'], | ||
'packages/client-common/__tests__/utils/*.ts': ['webpack', 'sourcemap'], | ||
}, | ||
reporters: ['mocha'], | ||
port: 9876, | ||
colors: true, | ||
logLevel: config.LOG_INFO, | ||
autoWatch: false, | ||
// available browser launchers: https://npmjs.org/browse/keyword/karma-launcher | ||
browsers: ['ChromeHeadless', 'FirefoxHeadless'], | ||
browserNoActivityTimeout: TEST_TIMEOUT_MS, | ||
browserDisconnectTimeout: TEST_TIMEOUT_MS, | ||
// if true, Karma captures browsers, runs the tests and exits | ||
singleRun: true, | ||
client: { | ||
jasmine: { | ||
random: false, | ||
stopOnSpecFailure: false, | ||
stopSpecOnExpectationFailure: true, | ||
timeoutInterval: TEST_TIMEOUT_MS, | ||
}, | ||
}, | ||
}) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.