Skip to content

Commit

Permalink
test: enable dev server test cases
Browse files Browse the repository at this point in the history
  • Loading branch information
LingyuCoder committed Sep 11, 2024
1 parent 930e351 commit 667bb0b
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 17 deletions.
26 changes: 10 additions & 16 deletions packages/rspack-dev-server/jest.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,23 +6,17 @@ const config = {
testEnvironmentOptions: {
url: "http://localhost/"
},
testMatch: [
"<rootDir>/tests/*.test.ts",
...(isWin || process.env.CI ? [] : ["<rootDir>/tests/e2e/*.test.js"])
testMatch: ["<rootDir>/tests/*.test.ts", ["<rootDir>/tests/e2e/*.test.js"]],
testPathIgnorePatterns: [
// TODO: check why http proxy server throw error with websocket server
"<rootDir>/tests/e2e/allowed-hosts.test.js",
// TODO: check why this test timeout
"<rootDir>/tests/e2e/host.test.js",
// TODO: not support progress plugin event yet
"<rootDir>/tests/e2e/progress.test.js",
// TODO: check why this test throw error when run with other tests
"<rootDir>/tests/e2e/watch-files.test.js"
],
testPathIgnorePatterns:
isWin || process.env.CI
? []
: [
// TODO: check why http proxy server throw error with websocket server
"<rootDir>/tests/e2e/allowed-hosts.test.js",
// TODO: check why this test timeout
"<rootDir>/tests/e2e/host.test.js",
// TODO: not support progress plugin event yet
"<rootDir>/tests/e2e/progress.test.js",
// TODO: check why this test throw error when run with other tests
"<rootDir>/tests/e2e/watch-files.test.js"
],
cache: false,
testTimeout: process.env.CI ? 120000 : 30000,
transform: {
Expand Down
3 changes: 2 additions & 1 deletion packages/rspack-dev-server/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,8 @@
"scripts": {
"build": "tsc -b ./tsconfig.build.json",
"dev": "tsc -w -b ./tsconfig.build.json",
"test": "rimraf .test-temp && cross-env NO_COLOR=1 node --expose-gc --max-old-space-size=8192 --experimental-vm-modules ../../node_modules/jest-cli/bin/jest --colors",
"test:install": "./node_modules/.bin/puppeteer browsers install chrome",
"test": "pnpm test:install && rimraf .test-temp && cross-env NO_COLOR=1 node --expose-gc --max-old-space-size=8192 --experimental-vm-modules ../../node_modules/jest-cli/bin/jest --colors",
"api-extractor": "api-extractor run --verbose",
"api-extractor:ci": "api-extractor run --verbose || diff temp/api.md etc/api.md"
},
Expand Down

0 comments on commit 667bb0b

Please sign in to comment.