You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am trying to make karma-commonjs work with jasmine and I get the following error on a very basic example:
Uncaught ReferenceError: jasmineRequire is not defined
at node_modules/karma-jasmine/lib/boot.js:14:17
ReferenceError: jasmineRequire is not defined
at node_modules/karma-jasmine/lib/boot.js:14:17
at window.__cjs_module__./home/alexander/projects/karma-test/node_modules/karma-jasmine/lib/boot.js (node_modules/karma-jasmine/lib/boot.js:43:2)
at runModule (node_modules/karma-commonjs/client/commonjs_bridge.js:40:5)
at require (node_modules/karma-commonjs/client/commonjs_bridge.js:79:14)
at node_modules/karma-commonjs/client/commonjs_bridge.js:141:13
at node_modules/karma-commonjs/client/commonjs_bridge.js:145:3
Here is my karma.config.js
module.exports = function (config) {
config.set({
// base path that will be used to resolve all patterns (eg. files, exclude)
basePath: '',
// frameworks to use
// available frameworks: https://www.npmjs.com/search?q=keywords:karma-adapter
frameworks: ['commonjs', 'jasmine'],
// list of files / patterns to load in the browser
files: [
{pattern: 'lib/**/*.js', included: false},
{pattern: 'src/**/*.js', included: false},
{pattern: 'test/**/*spec.js', included: false}
],
// preprocess matching files before serving them to the browser
// available preprocessors: https://www.npmjs.com/search?q=keywords:karma-preprocessor
preprocessors: {
'**/*.js': ['commonjs']
},
browsers: ['ChromeHeadless'],
})
}
Any help is greatly appreciated.
Thank you
Regards Alex
The text was updated successfully, but these errors were encountered:
Hello,
I am trying to make karma-commonjs work with jasmine and I get the following error on a very basic example:
Here is my karma.config.js
Any help is greatly appreciated.
Thank you
Regards Alex
The text was updated successfully, but these errors were encountered: