Skip to content

Commit

Permalink
resetAllMocks now available in bun
Browse files Browse the repository at this point in the history
  • Loading branch information
krisl committed Dec 1, 2023
1 parent 51222e7 commit 1a6c040
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions src/graph.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1247,9 +1247,7 @@ describe('Components', () => {
expect(logSpyWarn).toHaveBeenCalled()
expect(logSpyError).toHaveBeenCalled()

// needed for bun until resetAllMocks is available
logSpyWarn.mockReset()
logSpyError.mockReset()
jest.resetAllMocks()

Check failure on line 1250 in src/graph.test.ts

View workflow job for this annotation

GitHub Actions / build-bun (latest)

TypeError: jest.resetAllMocks is not a function. (In 'jest.resetAllMocks()'

at /home/runner/work/graferse/graferse/src/graph.test.ts:1250:12

Check failure on line 1250 in src/graph.test.ts

View workflow job for this annotation

GitHub Actions / build-bun (canary)

TypeError: jest.resetAllMocks is not a function. (In 'jest.resetAllMocks()'

at /home/runner/work/graferse/graferse/src/graph.test.ts:1250:12
})

describe('Locking in both directions', () => {
Expand Down Expand Up @@ -1352,8 +1350,7 @@ describe('Exceptions', () => {
expect(nodeB.isLocked()).toBeFalsy()
expect(nodeC.isLocked()).toBeFalsy()

// needed for bun until resetAllMocks is available
logSpyError.mockReset()
jest.resetAllMocks()
})
test('arrivedAt bounds', () => {
const getLockForLink = (from: Lock, to: Lock) => {
Expand Down

0 comments on commit 1a6c040

Please sign in to comment.