diff --git a/test/e2e/test/recorded-deps.test.ts b/test/e2e/test/recorded-deps.test.ts index 66e4ae933..3843fca6f 100644 --- a/test/e2e/test/recorded-deps.test.ts +++ b/test/e2e/test/recorded-deps.test.ts @@ -818,7 +818,7 @@ test('a run of the affected tests keeps the records of the other tests', async ( }) test('a rerun of one file in watch mode keeps the records of the other files', async () => { - const { ctx, fs, stderr } = await runInlineTests( + const { ctx, fs, stderr, vitest } = await runInlineTests( { 'src/helper.js': 'export {}', 'src/other.js': 'export {}', @@ -828,9 +828,12 @@ test('a rerun of one file in watch mode keeps the records of the other files', a { ...config, watch: true }, ) expect(stderr).toBe('') + await vitest.waitForStdout('Waiting for file changes') + vitest.resetOutput() fs.editFile('a.test.js', (content) => content.replace('src/helper.js', 'src/other.js')) - await ctx!.rerunFiles([fs.resolveFile('a.test.js')]) + await vitest.waitForStdout('RERUN') + await vitest.waitForStdout('Waiting for file changes') expect(readDependencies(ctx)).toMatchInlineSnapshot(` {