Skip to content

Commit 00c5b84

Browse files
committed
enable es6 in tests, --harmony
1 parent 10ff005 commit 00c5b84

File tree

3 files changed

+6
-5
lines changed

3 files changed

+6
-5
lines changed

src/create-runner.js

+1
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ function createRunner(config, tests) {
2222
return spawn(node, [
2323
'/usr/local/bin/mocha',
2424
'--bail',
25+
'--harmony',
2526
("--reporter=" + path.join(__dirname, 'reporter'))
2627
].concat(runnerOptions).concat(tests), options);
2728
}

test/babel.spec.js

+3-3
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,9 @@ var chaiAsPromised = require("chai-as-promised");
44
chai.use(chaiAsPromised);
55
var expect = chai.expect;
66

7-
var getRunner = require('./utils/babel-runner').getRunner;
7+
var getRunner = require('./utils/runner').getRunner;
88

9-
xdescribe('babel', function() {
9+
describe('babel', function() {
1010

1111
it('should load tests written in es6', function() {
1212
var files = [
@@ -23,7 +23,7 @@ xdescribe('babel', function() {
2323
return expect(run).to.eventually.deep.equal(expected);
2424
});
2525

26-
it('should compile files before running tests', function() {
26+
xit('should compile files before running tests', function() {
2727
var files = [
2828
['./babel-02.js']
2929
];

test/tests/babel-01.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
1+
'use strict';
12
var expect = require('chai').expect;
23

34
describe('babel-01', function () {
45

56
const a = 40;
67
let b = 2;
7-
var stringLit = `${a} + ${b} = ${a + b}`;
8-
console.log(stringList);
8+
var stringList = `${a} + ${b} = ${a + b}`;
99

1010
it('should pass', function () {
1111
expect(stringList).to.equal('40 + 2 = 42');

0 commit comments

Comments
 (0)