Skip to content

Commit

Permalink
test: fix n=0 test
Browse files Browse the repository at this point in the history
  • Loading branch information
yamcodes committed Sep 11, 2024
1 parent a02255d commit 7343ee6
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion tests/array/cartesianProduct.test.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
import * as _ from 'radashi'

describe('cartesianProduct', () => {
test('returns an empty array when given an array containing an empty array (n=1)', () => {
test('returns an array containing an empty array when given an empty input (n=0)', () => {
expect(_.cartesianProduct()).toEqual([[]])
})
test('returns an empty array when given an empty array (n=1)', () => {
expect(_.cartesianProduct([])).toEqual([])
})
test('returns an empty array when given multiple empty arrays (n>1)', () => {
Expand Down

0 comments on commit 7343ee6

Please sign in to comment.