Skip to content

Instantly share code, notes, and snippets.

@artemdemo
Forked from mauvm/Jasmine-and-Babel6.md
Created June 15, 2017 19:14
Show Gist options
  • Save artemdemo/38ff470116cc77bd58352dc39226f399 to your computer and use it in GitHub Desktop.
Save artemdemo/38ff470116cc77bd58352dc39226f399 to your computer and use it in GitHub Desktop.
Jasmine ES6 run script for use with Babel 6
$ npm install --save babel-cli babel-preset-es2015
$ npm install --save-dev jasmine

.babelrc:

{
  "presets": ["es2015"]
}

package.json:


"scripts": {
  "test": "babel-node spec/run.js"
},

spec/run.js:

import Jasmine from 'jasmine'

var jasmine = new Jasmine()
jasmine.loadConfigFile('spec/support/jasmine.json')
jasmine.execute()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment