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 committed Oct 1, 2018
1 parent 0f5c93a commit a9012df
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 a9012df

Please sign in to comment.