Commit a6c2d297 authored by NzSN's avatar NzSN

update karma config

parent 09fbfdc5
...@@ -17,40 +17,42 @@ module.exports = function(config) { ...@@ -17,40 +17,42 @@ module.exports = function(config) {
config.set({ config.set({
// base path that will be used to resolve all patterns (eg. files, exclude) // base path that will be used to resolve all patterns (eg. files, exclude)
basePath: '', basePath: '',
// frameworks to use // frameworks to use
// available frameworks: https://www.npmjs.com/search?q=keywords:karma-adapter // available frameworks: https://www.npmjs.com/search?q=keywords:karma-adapter
frameworks: [ 'jasmine', 'webpack' ], frameworks: [ 'jasmine', 'browserify' ],
// list of files / patterns to load in the browser // list of files / patterns to load in the browser
files: [ files: [
"./specs.js", { pattern: 'src/res.js', included: true },
{ pattern: "src/mp4encoder.wasm", included: false, served:true },
{ pattern: 'tmp/**/*.js', included: false, served: true },
{ pattern: 'tmp/**/*.wasm', included: false, served: true },
{ pattern: 'src/**/*.js', included: false, served: true },
], ],
// list of files / patterns to exclude // list of files / patterns to exclude
exclude: [ exclude: [
], ],
proxies: { proxies: {},
'/tmp/mp4encoder.wasm': '/base/src/mp4encoder.wasm',
'/tmp': '/base/tmp/',
'/src': '/base/src/',
},
// preprocess matching files before serving them to the browser // preprocess matching files before serving them to the browser
// available preprocessors: https://www.npmjs.com/search?q=keywords:karma-preprocessor // available preprocessors: https://www.npmjs.com/search?q=keywords:karma-preprocessor
preprocessors: { preprocessors: {
'./specs.js': ['webpack'], 'src/res.js': [ 'browserify'],
}, },
webpack: webpackConfig,
browserify: {
debug: true,
transform: [
[
'babelify', {
"presets": ["@babel/preset-env"],
"plugins": ["@babel/transform-runtime"]
}
]
]
},
// test results reporter to use // test results reporter to use
// possible values: 'dots', 'progress' // possible values: 'dots', 'progress'
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment