From 7c475b614577991ec10a992261a457ea0116de7b Mon Sep 17 00:00:00 2001 From: Lars Willighagen Date: Mon, 30 Apr 2018 01:05:50 +0200 Subject: [PATCH] [site:test] Fix browser tests again expect.js doesn't play nicely with Babel, so it shouldn't be transformed by Babelify.^1 Note that the ignore option in Babelify is buggy ^2, so this might not work on your end. ^1 https://github.com/Automattic/expect.js/issues/149 ^2 https://github.com/babel/babelify/issues/265 --- tools/build-test.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/tools/build-test.js b/tools/build-test.js index 8b4d0aa..a2a407b 100644 --- a/tools/build-test.js +++ b/tools/build-test.js @@ -6,6 +6,9 @@ var babelify = require('babelify') browserify() .exclude(['citation-js']) .add('./test/wrapper.js') - .transform(babelify, {global: true}) + .transform(babelify, { + global: true, + ignore: ['node_modules/expect.js/'] + }) .bundle() .pipe(fs.createWriteStream(path.join(__dirname, '../build/test.citation.js')))