Skip to content

Commit

Permalink
Fix build
Browse files Browse the repository at this point in the history
  • Loading branch information
j-f1 committed Jun 29, 2017
1 parent be7e0ce commit 97a53cd
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 22 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -6,21 +6,6 @@ const deadcode = require("../src/index");
const simplify = require("../../babel-plugin-minify-simplify/src/index");
const thePlugin = require("../../../utils/test-transform")(deadcode);

function transform(code, options, babelOpts) {
return babel
.transform(
code,
Object.assign(
{},
{
plugins: [[deadcode, options]]
},
babelOpts
)
)
.code.trim();
}

function transformWithSimplify(code) {
return babel.transform(code, {
plugins: [deadcode, simplify]
Expand Down Expand Up @@ -706,7 +691,8 @@ describe("dce-plugin", () => {
foo();
}
`);
`
);

thePlugin(
"should evaluate conditional expressions",
Expand Down Expand Up @@ -1008,7 +994,7 @@ describe("dce-plugin", () => {
thePlugin(
"should eval the following to false",
`
function bar () {
function bar() {
var x = foo || "boo";
bar = x === "wow" ? " " + z : "";
}
Expand Down Expand Up @@ -1917,7 +1903,6 @@ describe("dce-plugin", () => {
`
);


// https://github.com/babel/babili/issues/232
thePlugin(
"should not regress on issue #232 - array patterns and object patterns with non constant init",
Expand Down Expand Up @@ -2208,7 +2193,6 @@ describe("dce-plugin", () => {
a.b();
foo();
a.b();
b.c();
Expand Down Expand Up @@ -2420,7 +2404,7 @@ describe("dce-plugin", () => {
);

thePlugin(
"should remove unnecessary \"use strict\"; directives",
'should remove unnecessary "use strict"; directives',
`
function foo() {
"use strict";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@ describe("simplify-comparison-operators-plugin", () => {
`
);


thePlugin(
"should not simplify comparisons where losing the third = would change the result",
`
Expand Down
2 changes: 1 addition & 1 deletion utils/test-transform.js
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ function makeTester(
});
};
thePlugin.skip = name => it.skip(name);
if (!excludeKeys.includes("inEachLine")) {
if (excludeKeys.indexOf("inEachLine") === -1) {
thePlugin.inEachLine = makeTester(
plugins,
opts,
Expand Down

0 comments on commit 97a53cd

Please sign in to comment.