Skip to content

Commit bd059fb

Browse files
committed
Stop reading .babelrc files.
If a `.babelrc` file is present, it is being read, and the settings merged with the ones we specify for tests. We don't want that. Reference: http://babeljs.io/docs/usage/options/
1 parent f696271 commit bd059fb

5 files changed

Lines changed: 21 additions & 1 deletion

File tree

lib/test-worker.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,8 @@ var send = require('./send');
5151

5252
// if generators are not supported, use regenerator
5353
var options = {
54-
sourceMaps: true
54+
sourceMaps: true,
55+
babelrc: false
5556
};
5657

5758
// check if test files required ava and show error, when they didn't

test/fixture/babelrc/.babelrc

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"plugins": ["this-plugin-does-not-exist"]
3+
}

test/fixture/babelrc/package.json

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
{
2+
"name": "application-name",
3+
"version": "0.0.1"
4+
}

test/fixture/babelrc/test.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
import test from '../../../'
2+
3+
test(t => t.pass());

test/fork.js

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,3 +83,12 @@ test('destructuring of `t` is allowed', function (t) {
8383
t.end();
8484
});
8585
});
86+
87+
test('babelrc is ignored', function (t) {
88+
fork(fixture('babelrc/test.js'))
89+
.run()
90+
.then(function (info) {
91+
t.is(info.stats.passCount, 1);
92+
t.end();
93+
});
94+
});

0 commit comments

Comments
 (0)