Skip to content

Commit e6e86fb

Browse files
committed
test(arrayutils): rebase and delete unnecessary code
1 parent 755eeda commit e6e86fb

File tree

1 file changed

+1
-17
lines changed

1 file changed

+1
-17
lines changed

packages/bezier-react/src/utils/arrayUtils.test.ts

Lines changed: 1 addition & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,7 @@
11
/* Internal dependencies */
2-
import { removeItem, compact, flattenDeep } from './arrayUtils'
2+
import { compact, flattenDeep } from './arrayUtils'
33

44
describe('arrayUtils', () => {
5-
describe('removeItem', () => {
6-
it('should remove item of given index', () => {
7-
const array = [1, 2, 3, 4, 5]
8-
9-
expect(removeItem(array, 0)).toEqual([2, 3, 4, 5])
10-
expect(removeItem(array, 2)).toEqual([1, 2, 4, 5])
11-
})
12-
13-
it('should return given array if index is out-of-bound', () => {
14-
const array = [1, 2, 3, 4, 5]
15-
16-
expect(removeItem(array, -1)).toEqual(array)
17-
expect(removeItem(array, 5)).toEqual(array)
18-
})
19-
})
20-
215
describe('compact', () => {
226
it('should remove falsy item', () => {
237
const array = [0, 1, false, 2, '', 3]

0 commit comments

Comments
 (0)