Skip to content

Commit

Permalink
Improve assertions
Browse files Browse the repository at this point in the history
  • Loading branch information
Tyriar committed Apr 16, 2024
1 parent 73eace5 commit f18f406
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ import { assertNoRpc } from '../utils';
}
await endEvent;

ok(events.length >= 3);
ok(events.length >= 3, `should have at least 3 events ${JSON.stringify(events)}`);
strictEqual(events[0], 'start');
strictEqual(events.at(-1), 'end');
for (let i = 1; i < events.length - 1; i++) {
Expand All @@ -156,7 +156,7 @@ import { assertNoRpc } from '../utils';
}
await endEvent;

ok(events.join('').includes('hello'));
ok(events.join('').includes('hello'), `should include 'hello' in ${JSON.stringify(events)}`);

await closeTerminalAsync(terminal);
});
Expand Down Expand Up @@ -191,7 +191,7 @@ import { assertNoRpc } from '../utils';
]);
await endEvent;

ok(firstReadEvents.join('').includes('hello'));
ok(firstReadEvents.join('').includes('hello'), `should include 'hello' in ${JSON.stringify(firstReadEvents)}`);
deepStrictEqual(firstReadEvents, secondReadEvents);

await closeTerminalAsync(terminal);
Expand Down

0 comments on commit f18f406

Please sign in to comment.