Thanks to visit codestin.com
Credit goes to github.com

Skip to content
This repository was archived by the owner on Sep 16, 2024. It is now read-only.

Commit e9a56a4

Browse files
committed
Add basic test
1 parent 374504b commit e9a56a4

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed

arrayStringMap.test.ts

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
import { assert } from "chai"
2+
import ArrayStringMap from "./arrayStringMap"
3+
4+
describe("arrayStringMap", () => {
5+
const sampleArray1 = [1, 2]
6+
const sampleArray2 = [1, 2]
7+
const sampleArray3 = [1, 3]
8+
const sampleValue1 = 1
9+
const sampleValue2 = 2
10+
it("Empty map", () => {
11+
const arrayStringMap = new ArrayStringMap();
12+
assert(arrayStringMap.size === 0, "Empty map size is 0");
13+
assert(arrayStringMap.get(sampleArray1) === undefined, "Empty map get returns undefined");
14+
assert(!arrayStringMap.has(sampleArray1), "Empty map has returns false");
15+
assert([...arrayStringMap.entries()].length === 0, "Empty map entries returns empty array");
16+
})
17+
})

0 commit comments

Comments
 (0)