Skip to content

Commit 3c23e3d

Browse files
committed
test: remove webpack from snapshot name
1 parent b3546bf commit 3c23e3d

34 files changed

Lines changed: 10 additions & 1105 deletions

rstest.config.ts

Lines changed: 2 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,7 @@
1-
import path from 'node:path';
21
import { defineConfig } from '@rstest/core';
3-
import { webpackVersion } from '@rspack/core/package.json';
2+
import { version } from '@rspack/core/package.json';
43

5-
const snapshotExtension = `.snap.webpack${webpackVersion[0]}`;
6-
7-
console.log(`Running tests for rspack @${webpackVersion} \n`);
4+
console.log(`Running tests for rspack @${version} \n`);
85

96
export default defineConfig({
107
globals: true,
@@ -27,10 +24,4 @@ export default defineConfig({
2724
hookTimeout: 30000,
2825
setupFiles: ['./tests/helpers/setup-test.js'],
2926
reporters: ['default'],
30-
resolveSnapshotPath: (testPath) =>
31-
path.join(
32-
path.dirname(testPath),
33-
'__snapshots__',
34-
`${path.basename(testPath)}${snapshotExtension}`,
35-
),
3627
});

tests/e2e/__snapshots__/allowed-hosts.test.js.snap.webpack5 renamed to tests/e2e/__snapshots__/allowed-hosts.test.js.snap

File renamed without changes.
File renamed without changes.

tests/e2e/__snapshots__/app.test.js.snap.webpack5 renamed to tests/e2e/__snapshots__/app.test.js.snap

Lines changed: 8 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -112,16 +112,14 @@ exports[`app option > should work using "connect" application and "https" server
112112
"
113113
`;
114114
115-
exports[`app option > should work using "connect" application and "spdy" server > should handle GET request to index route (/) > console messages 1`] = `
115+
exports[`app option > should work using "connect" application and "spdy" server > should handle GET request to index route (/) > console messages 1`] = `[]`;
116+
117+
exports[`app option > should work using "connect" application and "spdy" server > should handle GET request to index route (/) > page errors 1`] = `
116118
[
117-
"[webpack-dev-server] Server started: Hot Module Replacement enabled, Live Reloading enabled, Progress disabled, Overlay enabled.",
118-
"[HMR] Waiting for update signal from WDS...",
119-
"Hey.",
119+
[SyntaxError: Invalid or unexpected token],
120120
]
121121
`;
122122
123-
exports[`app option > should work using "connect" application and "spdy" server > should handle GET request to index route (/) > page errors 1`] = `[]`;
124-
125123
exports[`app option > should work using "connect" application and "spdy" server > should handle GET request to index route (/) > response status 1`] = `200`;
126124
127125
exports[`app option > should work using "connect" application and "spdy" server > should handle GET request to index route (/) > response text 1`] = `
@@ -196,16 +194,14 @@ exports[`app option > should work using "express" application and "https" server
196194
"
197195
`;
198196
199-
exports[`app option > should work using "express" application and "spdy" server > should handle GET request to index route (/) > console messages 1`] = `
197+
exports[`app option > should work using "express" application and "spdy" server > should handle GET request to index route (/) > console messages 1`] = `[]`;
198+
199+
exports[`app option > should work using "express" application and "spdy" server > should handle GET request to index route (/) > page errors 1`] = `
200200
[
201-
"[webpack-dev-server] Server started: Hot Module Replacement enabled, Live Reloading enabled, Progress disabled, Overlay enabled.",
202-
"[HMR] Waiting for update signal from WDS...",
203-
"Hey.",
201+
[SyntaxError: Invalid or unexpected token],
204202
]
205203
`;
206204
207-
exports[`app option > should work using "express" application and "spdy" server > should handle GET request to index route (/) > page errors 1`] = `[]`;
208-
209205
exports[`app option > should work using "express" application and "spdy" server > should handle GET request to index route (/) > response status 1`] = `200`;
210206
211207
exports[`app option > should work using "express" application and "spdy" server > should handle GET request to index route (/) > response text 1`] = `
File renamed without changes.

tests/e2e/__snapshots__/built-in-routes.test.js.snap.webpack5 renamed to tests/e2e/__snapshots__/built-in-routes.test.js.snap

File renamed without changes.

tests/e2e/__snapshots__/client-reconnect.test.js.snap.webpack5 renamed to tests/e2e/__snapshots__/client-reconnect.test.js.snap

File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 commit comments

Comments
 (0)