-
-
Notifications
You must be signed in to change notification settings - Fork 602
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
tests(ts): moved module concatenation plugin to ts
- Loading branch information
Showing
11 changed files
with
75 additions
and
74 deletions.
There are no files selected for viewing
31 changes: 0 additions & 31 deletions
31
...es/migrate/moduleConcatenationPlugin/__snapshots__/moduleConcatenationPlugin.test.js.snap
This file was deleted.
Oops, something went wrong.
5 changes: 0 additions & 5 deletions
5
...s/migrate/moduleConcatenationPlugin/__testfixtures__/moduleConcatenationPlugin-0.input.js
This file was deleted.
Oops, something went wrong.
9 changes: 0 additions & 9 deletions
9
...s/migrate/moduleConcatenationPlugin/__testfixtures__/moduleConcatenationPlugin-1.input.js
This file was deleted.
Oops, something went wrong.
9 changes: 0 additions & 9 deletions
9
...s/migrate/moduleConcatenationPlugin/__testfixtures__/moduleConcatenationPlugin-2.input.js
This file was deleted.
Oops, something went wrong.
36 changes: 36 additions & 0 deletions
36
.../moduleConcatenationPlugin/__tests__/__snapshots__/moduleConcatenationPlugin.test.ts.snap
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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()], | ||
}; | ||
" | ||
`; |
4 changes: 4 additions & 0 deletions
4
...moduleConcatenationPlugin/__tests__/__testfixtures__/moduleConcatenationPlugin-0.input.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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()], | ||
}; |
8 changes: 8 additions & 0 deletions
8
...moduleConcatenationPlugin/__tests__/__testfixtures__/moduleConcatenationPlugin-1.input.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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()], | ||
}; |
8 changes: 8 additions & 0 deletions
8
...moduleConcatenationPlugin/__tests__/__testfixtures__/moduleConcatenationPlugin-2.input.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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()], | ||
}; |
18 changes: 18 additions & 0 deletions
18
packages/migrate/moduleConcatenationPlugin/__tests__/moduleConcatenationPlugin.test.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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", | ||
); |
19 changes: 0 additions & 19 deletions
19
packages/migrate/moduleConcatenationPlugin/moduleConcatenationPlugin.test.js
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters