Skip to content

Commit

Permalink
replace false type assertion with @ts-ignore
Browse files Browse the repository at this point in the history
  • Loading branch information
HerbCaudill committed Apr 5, 2024
1 parent ef127c6 commit 08dd959
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions packages/automerge-repo/test/Repo.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -462,16 +462,16 @@ describe("Repo", () => {

it("makes an empty document if we try to import an automerge doc", async () => {
const { repo } = setup()
const handle = repo.import<TestDoc>(
A.from({ foo: 123 }) as unknown as Uint8Array
)
// @ts-ignore - passing something other than UInt8Array
const handle = repo.import<TestDoc>(A.from({ foo: 123 }))
const doc = await handle.doc()
expect(doc).toEqual({})
})

it("makes an empty document if we try to import a plain object", async () => {
const { repo } = setup()
const handle = repo.import<TestDoc>({ foo: 123 } as unknown as Uint8Array)
// @ts-ignore - passing something other than UInt8Array
const handle = repo.import<TestDoc>({ foo: 123 })
const doc = await handle.doc()
expect(doc).toEqual({})
})
Expand Down

0 comments on commit 08dd959

Please sign in to comment.