Skip to content

Commit

Permalink
Add failing test
Browse files Browse the repository at this point in the history
  • Loading branch information
kraenhansen committed Oct 4, 2024
1 parent d3e2935 commit fc6fe8b
Showing 1 changed file with 24 additions and 0 deletions.
24 changes: 24 additions & 0 deletions packages/e2e-tests/test/e2e.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -571,6 +571,30 @@ describe('e2e', function () {
shell.assertNoErrors();
});

it('prints only multiline dots between prompts', async function () {
await shell.waitForPrompt();
const outputOffsetBefore = shell.output.length;
shell.writeInputLine(`
const foo = {
bar: "baz"
};
`);

// Wait for some multiline dots
await shell.eventually(() => {
shell.assertContainsOutput('... ...');
});
const outputOffsetAfterDots = shell.output.length;
const outputBetween = shell.output
.substring(outputOffsetBefore, outputOffsetAfterDots)
.trim();
// Expect just the multiline dots
expect(outputBetween).equals('... ...');

// Waiting for a new prompt
await shell.waitForPrompt(outputOffsetAfterDots);
});

it('runs help command', async function () {
expect(await shell.executeLine('help')).to.include('Shell Help');
shell.assertNoErrors();
Expand Down

0 comments on commit fc6fe8b

Please sign in to comment.