Skip to content

Commit

Permalink
tests(ts): moved module concatenation plugin to ts
Browse files Browse the repository at this point in the history
  • Loading branch information
ematipico authored and dhruvdutt committed Nov 4, 2018
1 parent dd3a76c commit aa80327
Show file tree
Hide file tree
Showing 11 changed files with 75 additions and 74 deletions.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP

exports[`moduleConcatenationPlugin transforms correctly using "moduleConcatenationPlugin-0" data 1`] = `
"import webpack from \\"webpack\\";
module.exports = {
optimizations: {
concatenateModules: true
}
};
"
`;

exports[`moduleConcatenationPlugin transforms correctly using "moduleConcatenationPlugin-1" data 1`] = `
"import webpack from \\"webpack\\";
class Foo {}
module.exports = {
optimizations: {
splitChunks: false,
concatenateModules: true
},
plugins: [new Foo()],
};
"
`;

exports[`moduleConcatenationPlugin transforms correctly using "moduleConcatenationPlugin-2" data 1`] = `
"import webpack from \\"webpack\\";
class Foo {}
module.exports = {
optimizations: {
concatenateModules: true
},
plugins: [new Foo()],
};
"
`;
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
import webpack from "webpack";
module.exports = {
plugins: [new webpack.optimize.ModuleConcatenationPlugin()],
};
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
import webpack from "webpack";
class Foo {}
module.exports = {
optimizations: {
splitChunks: false,
},
plugins: [new Foo(), new webpack.optimize.ModuleConcatenationPlugin()],
};
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
import webpack from "webpack";
class Foo {}
module.exports = {
optimizations: {
concatenateModules: false,
},
plugins: [new Foo(), new webpack.optimize.ModuleConcatenationPlugin()],
};
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
import defineTest from "@webpack-cli/utils/defineTest";
import { join } from "path";

defineTest(
join(__dirname, ".."),
"moduleConcatenationPlugin",
"moduleConcatenationPlugin-0",
);
defineTest(
join(__dirname, ".."),
"moduleConcatenationPlugin",
"moduleConcatenationPlugin-1",
);
defineTest(
join(__dirname, ".."),
"moduleConcatenationPlugin",
"moduleConcatenationPlugin-2",
);

This file was deleted.

2 changes: 1 addition & 1 deletion tsconfig.base.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,5 @@
"skipLibCheck": true
},
"include": ["packages/**/*.ts"],
"exclude": ["node_modules/**", "packages/*/node_modules/**", "packages/*/__tests__/*.test.ts"]
"exclude": ["node_modules/**", "packages/*/node_modules/**", "packages/**/__tests__/*.test.ts", "packages/**/__testfixtures__/*.ts"]
}

0 comments on commit aa80327

Please sign in to comment.