Skip to content

Commit d2f9d9f

Browse files
committed
chore: fix breaking tests and typechecking
1 parent bd82fb7 commit d2f9d9f

File tree

2 files changed

+9
-2
lines changed

2 files changed

+9
-2
lines changed

src/test_runner.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -386,7 +386,7 @@ export class TestRunner {
386386
this.#hooks.runner('fileAdded').run(string.toUnixSlash(filePath), this)
387387
)
388388
this.#watcher.on('change', (filePath) =>
389-
this.#hooks.runner('fileChanged').run(string.toUnixSlash(filePath), this)
389+
this.#hooks.runner('fileChanged').run(string.toUnixSlash(filePath), false, this)
390390
)
391391
this.#watcher.on('unlink', (filePath) =>
392392
this.#hooks.runner('fileRemoved').run(string.toUnixSlash(filePath), this)

tests/utils/watch.spec.ts

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ import chokidar from 'chokidar'
1212
import { test } from '@japa/runner'
1313
import { parseConfig } from '../../src/utils.ts'
1414
import { FileSystem } from '../../src/file_system.ts'
15+
import string from '@poppinss/utils/string'
1516

1617
test.group('Watch', () => {
1718
test('get watch files list based using file system', async ({ assert, cleanup, fs }, done) => {
@@ -54,7 +55,13 @@ test.group('Watch', () => {
5455
cleanup(() => watcher.close())
5556

5657
watcher.on('ready', () => {
57-
assert.snapshot(watcher.getWatched()).matchInline(`
58+
const watchedFiles = watcher.getWatched()
59+
assert.snapshot(
60+
Object.keys(watcher.getWatched()).reduce<any>((result, key) => {
61+
result[string.toUnixSlash(key)] = watchedFiles[key]
62+
return result
63+
}, {})
64+
).matchInline(`
5865
{
5966
".": [
6067
"public",

0 commit comments

Comments
 (0)