Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

test: disable isolate for unit test #17448

Merged
merged 4 commits into from
Jun 13, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
chore: try fix
  • Loading branch information
bluwy committed Jun 12, 2024
commit 4f17ceb8f58c845986fb1b7198a293f94d9a0a98
13 changes: 7 additions & 6 deletions packages/vite/src/node/server/__tests__/watcher.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,14 +38,15 @@
new URL('./fixtures/watcher/nested-root', import.meta.url),
)
server = await createServer({ root })
await new Promise((resolve) => server!.watcher.on('ready', resolve))
await new Promise((resolve) => server!.watcher.once('ready', resolve))
const watchedDirs = Object.keys(server.watcher.getWatched())
expect(watchedDirs).toEqual(

Check failure on line 43 in packages/vite/src/node/server/__tests__/watcher.spec.ts

View workflow job for this annotation

GitHub Actions / Build&Test: node-18, ubuntu-latest

packages/vite/src/node/server/__tests__/watcher.spec.ts > watcher configuration > should watch the root directory, config file dependencies, dotenv files, and the public directory

AssertionError: expected [ …(3) ] to deeply equal ArrayContaining{…} - Expected + Received - ArrayContaining [ - "/home/runner/work/vite/vite/packages/vite/src/node/server/__tests__/fixtures/watcher/nested-root", + Array [ "/home/runner/work/vite/vite/packages/vite/src/node/server/__tests__/fixtures/watcher/config-deps", + "/home/runner/work/vite/vite/packages/vite/src/node/server/__tests__/fixtures/watcher/nested-root", "/home/runner/work/vite/vite/packages/vite/src/node/server/__tests__/fixtures/watcher/custom-env", - "/home/runner/work/vite/vite/packages/vite/src/node/server/__tests__/fixtures/watcher/custom-public", ] ❯ packages/vite/src/node/server/__tests__/watcher.spec.ts:43:25

Check failure on line 43 in packages/vite/src/node/server/__tests__/watcher.spec.ts

View workflow job for this annotation

GitHub Actions / Build&Test: node-20, ubuntu-latest

packages/vite/src/node/server/__tests__/watcher.spec.ts > watcher configuration > should watch the root directory, config file dependencies, dotenv files, and the public directory

AssertionError: expected [ …(3) ] to deeply equal ArrayContaining{…} - Expected + Received - ArrayContaining [ - "/home/runner/work/vite/vite/packages/vite/src/node/server/__tests__/fixtures/watcher/nested-root", + Array [ "/home/runner/work/vite/vite/packages/vite/src/node/server/__tests__/fixtures/watcher/config-deps", + "/home/runner/work/vite/vite/packages/vite/src/node/server/__tests__/fixtures/watcher/nested-root", "/home/runner/work/vite/vite/packages/vite/src/node/server/__tests__/fixtures/watcher/custom-env", - "/home/runner/work/vite/vite/packages/vite/src/node/server/__tests__/fixtures/watcher/custom-public", ] ❯ packages/vite/src/node/server/__tests__/watcher.spec.ts:43:25

Check failure on line 43 in packages/vite/src/node/server/__tests__/watcher.spec.ts

View workflow job for this annotation

GitHub Actions / Build&Test: node-22, ubuntu-latest

packages/vite/src/node/server/__tests__/watcher.spec.ts > watcher configuration > should watch the root directory, config file dependencies, dotenv files, and the public directory

AssertionError: expected [ …(3) ] to deeply equal ArrayContaining{…} - Expected + Received - ArrayContaining [ - "/home/runner/work/vite/vite/packages/vite/src/node/server/__tests__/fixtures/watcher/nested-root", + Array [ "/home/runner/work/vite/vite/packages/vite/src/node/server/__tests__/fixtures/watcher/config-deps", + "/home/runner/work/vite/vite/packages/vite/src/node/server/__tests__/fixtures/watcher/nested-root", "/home/runner/work/vite/vite/packages/vite/src/node/server/__tests__/fixtures/watcher/custom-env", - "/home/runner/work/vite/vite/packages/vite/src/node/server/__tests__/fixtures/watcher/custom-public", ] ❯ packages/vite/src/node/server/__tests__/watcher.spec.ts:43:25

Check failure on line 43 in packages/vite/src/node/server/__tests__/watcher.spec.ts

View workflow job for this annotation

GitHub Actions / Build&Test: node-20.13.1, windows-latest

packages/vite/src/node/server/__tests__/watcher.spec.ts > watcher configuration > should watch the root directory, config file dependencies, dotenv files, and the public directory

AssertionError: expected [ …(3) ] to deeply equal ArrayContaining{…} - Expected + Received - ArrayContaining [ - "D:\\a\\vite\\vite\\packages\\vite\\src\\node\\server\\__tests__\\fixtures\\watcher\\nested-root", + Array [ "D:\\a\\vite\\vite\\packages\\vite\\src\\node\\server\\__tests__\\fixtures\\watcher\\config-deps", + "D:\\a\\vite\\vite\\packages\\vite\\src\\node\\server\\__tests__\\fixtures\\watcher\\nested-root", "D:\\a\\vite\\vite\\packages\\vite\\src\\node\\server\\__tests__\\fixtures\\watcher\\custom-env", - "D:\\a\\vite\\vite\\packages\\vite\\src\\node\\server\\__tests__\\fixtures\\watcher\\custom-public", ] ❯ packages/vite/src/node/server/__tests__/watcher.spec.ts:43:25
expect.arrayContaining(
['.', '../config-deps', '../custom-env', '../custom-public'].map(
(dir) => resolve(root, dir).replace(/\\/g, '/'),
),
),
expect.arrayContaining([
root,
resolve(root, '../config-deps'),
resolve(root, '../custom-env'),
resolve(root, '../custom-public'),
]),
)
})
})
Loading