When I launch my tests with ./node_modules/.bin/cucumberjs tests/features
they run ok, but when I launch tests with npm test
I get the following error:
20 06 2016 10:40:37.610:INFO [Firefox 44.0.0 (Ubuntu 0.0.0)]: Connected on socket /#0o9c3SofFmLLUL3AAAAB with id 99491078
Firefox 44.0.0 (Ubuntu 0.0.0) ERROR
ReferenceError: setImmediate is not defined
at node_modules/cucumber/release/cucumber.js:211
Does somebody has an idea of what is happening?
This is my package.json file:
{
"name": "...",
"version": "1.0.0",
"description": "...",
"main": "googlemappers.js",
"devDependencies": {
"chai": "^3.5.0",
"cucumber": "^0.10.4",
"jquery": "^3.0.0",
"karma": "^0.13.22",
"karma-chai": "^0.1.0",
"karma-cucumber-js": "^0.2.0",
"karma-firefox-launcher": "^1.0.0",
"karma-mocha": "^1.0.1",
"mocha": "^2.5.3"
},
"scripts": {
"test": "karma start karma.conf.js"
},
"repository": {
"type": "git",
"url": "..."
},
"author": "...",
"license": "",
"homepage": "..."
}
},
And this is my karma.conf.js:
module.exports = function(config) {
config.set({
basePath: '',
frameworks: [
'mocha',
'chai',
'cucumber-js'
],
files: [
'src/*.js',
'tests/features/*.feature'
],
exclude: [
],
preprocessors: {
},
reporters: ['progress'],
port: 9876,
colors: true,
logLevel: config.LOG_INFO,
autoWatch: true,
browsers: ['Firefox'],
singleRun: false,
concurrency: Infinity
})
}