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 Sep 29, 2018
1 parent 8dec8e8 commit aad27ec
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.

@@ -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()],
};
"
`;
@@ -0,0 +1,4 @@
import webpack from "webpack";
module.exports = {
plugins: [new webpack.optimize.ModuleConcatenationPlugin()],
};
@@ -0,0 +1,8 @@
import webpack from "webpack";
class Foo {}
module.exports = {
optimizations: {
splitChunks: false,
},
plugins: [new Foo(), new webpack.optimize.ModuleConcatenationPlugin()],
};
@@ -0,0 +1,8 @@
import webpack from "webpack";
class Foo {}
module.exports = {
optimizations: {
concatenateModules: false,
},
plugins: [new Foo(), new webpack.optimize.ModuleConcatenationPlugin()],
};
@@ -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
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 aad27ec

Please sign in to comment.