Skip to content

Instantly share code, notes, and snippets.

@congwenma
Forked from mauvm/Jasmine-and-Babel6.md
Created July 22, 2016 15:40
Show Gist options
  • Save congwenma/8a2262ffa9e18388a473b331d1e16e65 to your computer and use it in GitHub Desktop.
Save congwenma/8a2262ffa9e18388a473b331d1e16e65 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