From 5f5be31a53e9689bf32223efe49a130798a33750 Mon Sep 17 00:00:00 2001 From: James Talmage Date: Sat, 2 Jan 2016 21:42:21 -0500 Subject: [PATCH] add tests for ignoring babelrc --- test/fixture/babelrc/.babelrc | 3 +++ test/fixture/babelrc/package.json | 4 ++++ test/fixture/babelrc/test.js | 3 +++ test/fork.js | 9 +++++++++ 4 files changed, 19 insertions(+) create mode 100644 test/fixture/babelrc/.babelrc create mode 100644 test/fixture/babelrc/package.json create mode 100644 test/fixture/babelrc/test.js diff --git a/test/fixture/babelrc/.babelrc b/test/fixture/babelrc/.babelrc new file mode 100644 index 0000000..c7aec8e --- /dev/null +++ b/test/fixture/babelrc/.babelrc @@ -0,0 +1,3 @@ +{ + "plugins": ["this-plugin-does-not-exist"] +} diff --git a/test/fixture/babelrc/package.json b/test/fixture/babelrc/package.json new file mode 100644 index 0000000..daa8ae3 --- /dev/null +++ b/test/fixture/babelrc/package.json @@ -0,0 +1,4 @@ +{ + "name": "application-name", + "version": "0.0.1" +} diff --git a/test/fixture/babelrc/test.js b/test/fixture/babelrc/test.js new file mode 100644 index 0000000..a5315da --- /dev/null +++ b/test/fixture/babelrc/test.js @@ -0,0 +1,3 @@ +import test from '../../../' + +test(t => t.pass()); diff --git a/test/fork.js b/test/fork.js index e67def9..e748543 100644 --- a/test/fork.js +++ b/test/fork.js @@ -81,3 +81,12 @@ test('destructuring of `t` is allowed', function (t) { t.end(); }); }); + +test('babelrc is ignored', function (t) { + fork(fixture('babelrc/test.js')) + .run() + .then(function (info) { + t.is(info.stats.passCount, 1); + t.end(); + }); +});