fix project filter test
This commit is contained in:
parent
b4707ca82e
commit
52a6bdb803
|
|
@ -119,7 +119,7 @@ export async function runWatchModeLoop(configLocation: ConfigLocation, initialOp
|
|||
}
|
||||
changedFiles.clear();
|
||||
|
||||
if (dirtyTestIds.size > 0) {
|
||||
if (dirtyTestIds.size > 0) {
|
||||
onDirtyTests.resolve('changed');
|
||||
onDirtyTests = new ManualPromise();
|
||||
}
|
||||
|
|
@ -144,10 +144,9 @@ export async function runWatchModeLoop(configLocation: ConfigLocation, initialOp
|
|||
else
|
||||
printPrompt();
|
||||
|
||||
const readCommandPromise = readCommand();
|
||||
const command = await Promise.race([
|
||||
onDirtyTests,
|
||||
readCommandPromise,
|
||||
readCommand(),
|
||||
]);
|
||||
|
||||
if (bufferMode && command === 'changed')
|
||||
|
|
|
|||
|
|
@ -313,12 +313,17 @@ test('should respect project filter C', async ({ runWatchTest, writeFiles }) =>
|
|||
await testProcess.waitForOutput('[foo] › a.test.ts:3:11 › passes');
|
||||
expect(testProcess.output).not.toContain('[bar] › a.test.ts:3:11 › passes');
|
||||
|
||||
await testProcess.waitForOutput('Waiting for file changes.');
|
||||
testProcess.clearOutput();
|
||||
|
||||
await writeFiles(files); // file change triggers listTests with project filter
|
||||
await testProcess.waitForOutput('[foo] › a.test.ts:3:11 › passes');
|
||||
|
||||
testProcess.clearOutput();
|
||||
await testProcess.waitForOutput('Waiting for file changes.');
|
||||
|
||||
testProcess.write('c');
|
||||
testProcess.clearOutput();
|
||||
await testProcess.waitForOutput('Select projects');
|
||||
await testProcess.waitForOutput('foo');
|
||||
await testProcess.waitForOutput('bar'); // second selection should still show all
|
||||
|
|
|
|||
Loading…
Reference in a new issue