Skip to content

Commit

Permalink
fix: wrong expect.toThrow
Browse files Browse the repository at this point in the history
  • Loading branch information
folkvir committed May 3, 2024
1 parent 05b50c6 commit 0bf743b
Showing 1 changed file with 2 additions and 13 deletions.
15 changes: 2 additions & 13 deletions tests/min-hash.test.mts
Original file line number Diff line number Diff line change
Expand Up @@ -66,22 +66,11 @@ test('should ingest a set of numbers and compute the Jaccard similarity between
0.2
)
})
test('should throw an Error when we try to compare an empty MinHash with anoter MinHash', (done: (
arg0: Error | undefined
) => void) => {
test('should throw an Error when we try to compare an empty MinHash with anoter MinHash', () => {
const firstSet = factory.create()
const secondSet = factory.create()
secondSet.add(1)
try {
firstSet.compareWith(secondSet)
done(
new Error(
'compareWith should throw an error when we try to compare an empty set with another MinHash'
)
)
} catch (error) {
done(error)
}
expect(firstSet.compareWith(secondSet)).toThrow(Error)
})

test('should throw an Error when we try to compare a MinHash with an empty MinHash', (done: (
Expand Down

0 comments on commit 0bf743b

Please sign in to comment.