Skip to content

Instantly share code, notes, and snippets.

@emmanuelnwogbo
Forked from mauvm/Jasmine-and-Babel6.md
Created May 29, 2018 20:13
Show Gist options
  • Save emmanuelnwogbo/4bf93f998bb2fb8527bac50d2b809b9b to your computer and use it in GitHub Desktop.
Save emmanuelnwogbo/4bf93f998bb2fb8527bac50d2b809b9b 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