Skip to content

Instantly share code, notes, and snippets.

@AnnemarieKohler
Forked from mauvm/Jasmine-and-Babel6.md
Created August 5, 2017 20:59
Show Gist options
  • Save AnnemarieKohler/2f6a07ecd611da5b66e78b76a409476d to your computer and use it in GitHub Desktop.
Save AnnemarieKohler/2f6a07ecd611da5b66e78b76a409476d 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