Skip to content

Commit

Permalink
Fix failing timestamp tests
Browse files Browse the repository at this point in the history
  • Loading branch information
JHWelch committed Aug 30, 2023
1 parent b992f8b commit 655e1c6
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions __tests__/controllers/rsvpController.spec.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import RsvpController from '../../src/controllers/rsvpController'
import { beforeEach, describe, expect, it } from '@jest/globals'
import { getMockReq, getMockRes } from '@jest-mock/express'
import { addDoc } from 'firebase/firestore'
import { Timestamp, addDoc } from 'firebase/firestore'
import { FirebaseMock } from '../support/firebaseMock'
import FirestoreAdapter from '../../src/data/firestore/firestoreAdapter'

Expand Down Expand Up @@ -50,7 +50,7 @@ describe('store', () => {
name: 'test name',
email: '[email protected]',
plusOne: true,
createdAt: expect.anything(), // Timestamp is off
createdAt: expect.any(Timestamp.constructor),
}
)
})
Expand Down
2 changes: 1 addition & 1 deletion __tests__/data/firestore/firestoreAdapter.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -211,7 +211,7 @@ describe('createRsvp', () => {
name: 'test name',
email: '[email protected]',
plusOne: true,
createdAt: Timestamp.now(),
createdAt: expect.any(Timestamp.constructor),
}
)
})
Expand Down

0 comments on commit 655e1c6

Please sign in to comment.