Skip to content

Commit

Permalink
chore: try fix
Browse files Browse the repository at this point in the history
  • Loading branch information
bluwy committed Jun 12, 2024
1 parent bbb741f commit 4f17ceb
Showing 1 changed file with 7 additions and 6 deletions.
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 @@ describe('watcher configuration', () => {
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'),
]),
)
})
})

0 comments on commit 4f17ceb

Please sign in to comment.