Skip to content

Commit 1a67898

Browse files
authored
test: remove useless global setup file (#82)
1 parent d82ff93 commit 1a67898

36 files changed

Lines changed: 2 additions & 1160 deletions

package.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,6 @@
8989
"sockjs-client": "^1.6.1",
9090
"style-loader": "^4.0.0",
9191
"supertest": "^6.1.3",
92-
"tcp-port-used": "^1.0.2",
9392
"typescript": "^5.9.3",
9493
"wait-for-expect": "^3.0.2",
9594
"webpack": "^5.94.0",

pnpm-lock.yaml

Lines changed: 0 additions & 57 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

rstest.config.ts

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

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

86
export default defineConfig({
97
globals: true,
108
include: ['tests/*.test.ts', 'tests/e2e/*.test.js'],
119
exclude: [
12-
'**/node_modules/**',
13-
'**/dist/**',
1410
// TODO: check why this test timeout
1511
'<rootDir>/tests/e2e/host.test.js',
1612
// TODO: check why this test throw error when run with other tests
@@ -27,12 +23,5 @@ export default defineConfig({
2723
testTimeout: process.env.CI ? 120000 : 30000,
2824
hookTimeout: 30000,
2925
setupFiles: ['./tests/helpers/setup-test.js'],
30-
globalSetup: ['./tests/helpers/global-setup-test.js'],
3126
reporters: ['default'],
32-
resolveSnapshotPath: (testPath) =>
33-
path.join(
34-
path.dirname(testPath),
35-
'__snapshots__',
36-
`${path.basename(testPath)}${snapshotExtension}`,
37-
),
3827
});

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.
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.

0 commit comments

Comments
 (0)