Skip to content

Commit

Permalink
feat: added new wrapAuto method
Browse files Browse the repository at this point in the history
  • Loading branch information
vladcos committed Apr 6, 2023
1 parent 4b9440c commit 3e6c208
Showing 1 changed file with 0 additions and 14 deletions.
14 changes: 0 additions & 14 deletions tests/vitest/integration.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,17 +16,3 @@ it('fetcher', async () => {
expect(fetchSpy.mock.calls[0][1].signal.aborted).toBe(true)
expect(fetchSpy.mock.calls[1][1].signal.aborted).toBe(false)
})

it('execa', async () => {
const gateway = createGateway()
const { execa } = await import('execa')

const execaSpy = vi.fn(execa)
void gateway.runAuto(execaSpy, 'pwd', { shell: true })
void gateway.runAuto(execaSpy, 'pwd', { shell: true })
expect(execaSpy).toHaveBeenCalledTimes(0)
await setTimeout(20)
expect(execaSpy).toHaveBeenCalledTimes(1)
await gateway.runAuto(execaSpy, 'pwd', { shell: true })
expect(execaSpy.mock.calls[0][1].signal.aborted).toBe(true)
})

0 comments on commit 3e6c208

Please sign in to comment.