Created
March 3, 2017 17:02
-
-
Save nikolaswise/e578767283b9b7d00b13d8b277f1a4ce to your computer and use it in GitHub Desktop.
es6 module testing with babel tape runner ????
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// add.js | |
export default function (a, b) { | |
return a + b | |
} | |
// test.js | |
var test = require('tape'); | |
import add from './add'; | |
test('This is a thing!', function (t) { | |
t.plan(1); | |
var result = add(1,1) | |
var expect = 2 | |
t.equal(result, expect, 'This fails.'); | |
}); | |
// cli | |
$ babel-tape-runner tests/app/test.js | tap-spec |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
ERR-OR!: