Skip to content

Commit 17c8a3a

Browse files
authored
test: migrate tests to rstest (#21)
1 parent 372c21e commit 17c8a3a

37 files changed

+2087
-4440
lines changed

copy-plugin/CopyPlugin.test.js

Lines changed: 1089 additions & 1164 deletions
Large diffs are not rendered by default.

copy-plugin/__snapshots__/CopyPlugin.test.js.snap

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
// Jest Snapshot v1, https://jestjs.io/docs/snapshot-testing
1+
// Rstest Snapshot v1
22

3-
exports[`CopyPlugin basic should work with multi compiler mode: assets 1`] = `
3+
exports[`CopyPlugin > basic > should work with multi compiler mode > assets 1`] = `
44
Object {
55
".dottedfile": "dottedfile contents
66
",
@@ -10,7 +10,7 @@ Object {
1010
}
1111
`;
1212

13-
exports[`CopyPlugin basic should work with multi compiler mode: assets 2`] = `
13+
exports[`CopyPlugin > basic > should work with multi compiler mode > assets 2`] = `
1414
Object {
1515
".dottedfile": "dottedfile contents
1616
",
@@ -20,15 +20,15 @@ Object {
2020
}
2121
`;
2222

23-
exports[`CopyPlugin basic should work with multi compiler mode: errors 1`] = `Array []`;
23+
exports[`CopyPlugin > basic > should work with multi compiler mode > errors 1`] = `Array []`;
2424

25-
exports[`CopyPlugin basic should work with multi compiler mode: errors 2`] = `Array []`;
25+
exports[`CopyPlugin > basic > should work with multi compiler mode > errors 2`] = `Array []`;
2626

27-
exports[`CopyPlugin basic should work with multi compiler mode: warnings 1`] = `Array []`;
27+
exports[`CopyPlugin > basic > should work with multi compiler mode > warnings 1`] = `Array []`;
2828

29-
exports[`CopyPlugin basic should work with multi compiler mode: warnings 2`] = `Array []`;
29+
exports[`CopyPlugin > basic > should work with multi compiler mode > warnings 2`] = `Array []`;
3030

31-
exports[`CopyPlugin basic should work with to fn: assets 1`] = `
31+
exports[`CopyPlugin > basic > should work with to fn > assets 1`] = `
3232
Object {
3333
"directory/.dottedfile": "dottedfile contents
3434
",
@@ -38,7 +38,7 @@ Object {
3838
}
3939
`;
4040

41-
exports[`CopyPlugin basic should work with transform async fn: assets 1`] = `
41+
exports[`CopyPlugin > basic > should work with transform async fn > assets 1`] = `
4242
Object {
4343
".dottedfile": "dottedfile contents
4444
transform aaaa",
@@ -48,7 +48,7 @@ transform aaaa",
4848
}
4949
`;
5050

51-
exports[`CopyPlugin basic should work with transform fn: assets 1`] = `
51+
exports[`CopyPlugin > basic > should work with transform fn > assets 1`] = `
5252
Object {
5353
".dottedfile": "dottedfile contents
5454
transform aaaa",
@@ -58,14 +58,14 @@ transform aaaa",
5858
}
5959
`;
6060

61-
exports[`CopyPlugin stats should minify: assets 1`] = `
61+
exports[`CopyPlugin > stats > should minify > assets 1`] = `
6262
Object {
6363
"asset-modules/deepnested.txt": "",
6464
"unoptimized.js": "const a=1;console.log(1);",
6565
}
6666
`;
6767

68-
exports[`CopyPlugin stats should not minify: assets 1`] = `
68+
exports[`CopyPlugin > stats > should not minify > assets 1`] = `
6969
Object {
7070
"asset-modules/deepnested.txt": "",
7171
"unoptimized.js": "const a = 1;

copy-plugin/helpers/run.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ import AsyncEventIterator from "./AsyncEventIterator";
55
import removeIllegalCharacterForWindows from "./removeIllegalCharacterForWindows";
66
import { compile, getCompiler, readAssets } from "./index";
77
import { transformWindowPath } from "./readAssets";
8+
import { expect } from "@rstest/core";
89

910
function resolveCopy(copy) {
1011
if (!copy) {

0 commit comments

Comments
 (0)