Skip to content

Commit

Permalink
test: avoid magic number on cli playground spec (#15168)
Browse files Browse the repository at this point in the history
  • Loading branch information
patak-dev committed Nov 29, 2023
1 parent 9474c4b commit 793cebd
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion playground/cli/__tests__/cli.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,10 @@ test('cli should work', async () => {
})

test('should restart', async () => {
const logsLengthBeforeEdit = streams.server.out.length
editFile('./vite.config.js', (content) => content)
await withRetry(async () => {
const logs = streams.server.out.slice(2)
const logs = streams.server.out.slice(logsLengthBeforeEdit)
expect(logs).toEqual(
expect.arrayContaining([expect.stringMatching('server restarted')]),
)
Expand Down

0 comments on commit 793cebd

Please sign in to comment.