Closed indigo0086 closed 6 years ago
+1
+1
Is there any resolution on this one??
jasmine-node doesn't work with ES6 syntax. you have to use something like babel to compile it. My testing routine for my npm package.json
is
"scripts": {
"pretest": "babel src --out-dir lib && babel spec/*.es6 --out-dir .",
"test": "./node_modules/.bin/jasmine-node --verbose --captureExceptions spec",
"compile": "babel src --out-dir lib",
"prepublish": "npm test && npm run compile",
"doc": "esdoc -c ./esdoc.json"
},
@diogommartins Which babel did you install?
@erajune I'm currently using
"devDependencies": {
"babel-cli": "^6.0.0",
"babel-polyfill": "^6.8.0",
"babel-preset-es2015": "^6.6.0",
"jasmine-node": "^1.14.5"
}
This looks like the request is for something beyond the scope of this project. Marked as a feature request that will be declined, especially considering this project is now in maintenance mode.
Running jasmine-node using node 4 against a spec file that uses es6 generates the following error in the presence of any es6 specific syntax.