mirror of
https://github.com/Xahau/xahau.js.git
synced 2025-11-20 04:05:52 +00:00
Removes the testing polyfills by using jasmine and not jest in the browser. We were already using jasmine but where overriding those methods with jest versions which was not needed. The previous karma setup also used a single entrypoint which meant that not all integration tests were running because all files were not imported in integrations/index.ts. This also eliminates 79 dev dependencies.
40 lines
1.1 KiB
JavaScript
40 lines
1.1 KiB
JavaScript
const webpackConfig = require('./test/webpack.config')[0]()
|
|
delete webpackConfig.entry
|
|
|
|
module.exports = function (config) {
|
|
config.set({
|
|
plugins: ['karma-webpack', 'karma-jasmine', 'karma-chrome-launcher'],
|
|
|
|
// base path that will be used to resolve all patterns (eg. files, exclude)
|
|
basePath: '',
|
|
|
|
webpack: webpackConfig,
|
|
|
|
// frameworks to use
|
|
// available frameworks: https://npmjs.org/browse/keyword/karma-adapter
|
|
frameworks: ['jasmine'],
|
|
|
|
// list of files / patterns to load in the browser
|
|
files: ['build/xrpl-latest.js', 'test/integration/**/*.test.ts'],
|
|
|
|
// preprocess matching files before serving them to the browser
|
|
// available preprocessors: https://npmjs.org/browse/keyword/karma-preprocessor
|
|
preprocessors: {
|
|
// Use webpack to bundle our test files
|
|
'test/integration/**/*.test.ts': ['webpack'],
|
|
},
|
|
|
|
browsers: ['ChromeHeadless'],
|
|
// runs only one browser at a time
|
|
concurrency: 1,
|
|
// CI mode
|
|
singleRun: true,
|
|
client: {
|
|
jasmine: {
|
|
// ensures that tests are run in order instead of a random order
|
|
random: false,
|
|
},
|
|
},
|
|
})
|
|
}
|