Skip to content

Commit

Permalink
fix test
Browse files Browse the repository at this point in the history
  • Loading branch information
tylim88 committed Mar 23, 2024
1 parent 3d42b04 commit 47f1319
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/tests/discriminatedUnion.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,12 @@ type DU = MetaTypeCreator<
| { x: { y: 1; z: 2; u: 3 } | { y: 'a'; w: 'b'; v: 'c' } | false },
'abc'
>
const du = getFirelord<DU>(getFirestore(), 'abc')

const docRef = du.doc('123')
describe('test discrimination unions', () => {
it('test update', () => {
;() => {
const du = getFirelord<DU>(getFirestore(), 'abc')
const docRef = du.doc('123')
updateDoc(docRef, { a: { b: 1 } })
// @ts-expect-error
updateDoc(docRef, { a: { b: 2 } })
Expand Down Expand Up @@ -75,6 +75,7 @@ describe('test discrimination unions', () => {

it('test query', () => {
;() => {
const du = getFirelord<DU>(getFirestore(), 'abc')
query(du.collection(), where('a.b', '==', 1))
// @ts-expect-error
query(du.collection(), where('a.b', '==', 2))
Expand Down

0 comments on commit 47f1319

Please sign in to comment.