Skip to content

Commit

Permalink
sneaking in a fix for a windows test flake
Browse files Browse the repository at this point in the history
  • Loading branch information
cspotcode committed Jan 21, 2022
1 parent 876c700 commit 9fded48
Showing 1 changed file with 12 additions and 8 deletions.
20 changes: 12 additions & 8 deletions src/test/repl/repl.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -56,16 +56,20 @@ test('REPL has command to get type information', async () => {
test.serial('REPL can be configured on `start`', async (t) => {
const prompt = '#> ';

const { stdout, stderr } = await t.context.executeInRepl('const x = 3', {
registerHooks: true,
startInternalOptions: {
prompt,
ignoreUndefined: true,
},
});
const { stdout, stderr } = await t.context.executeInRepl(
`const x = 3\n'done'`,
{
waitPattern: "'done'",
registerHooks: true,
startInternalOptions: {
prompt,
ignoreUndefined: true,
},
}
);

expect(stderr).toBe('');
expect(stdout).toBe(`${prompt}${prompt}`);
expect(stdout).toBe(`${prompt}${prompt}'done'\n`);
});

// Serial because it's timing-sensitive
Expand Down

0 comments on commit 9fded48

Please sign in to comment.