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 35d7a5e

Browse files
committed
Enhance and run
1 parent e9a56a4 commit 35d7a5e

File tree

3 files changed

+22
-389
lines changed

3 files changed

+22
-389
lines changed

arrayStringMap.test.ts

Lines changed: 20 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,24 @@
11
import { assert } from "chai"
2-
import ArrayStringMap from "./arrayStringMap"
2+
import ArrayStringMap from "./arrayStringMap.js"
33

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");
4+
const sampleArray1 = [1, 2]
5+
const sampleArray2 = [1, 2]
6+
const sampleArray3 = [1, 3]
7+
const sampleValue1 = 1
8+
const sampleValue2 = 2
9+
10+
describe("Empty map", () => {
11+
const arrayStringMap = new ArrayStringMap();
12+
it("Empty map size is 0", () => {
13+
assert(arrayStringMap.size === 0);
14+
})
15+
it ("Empty map get returns undefined", () => {
16+
assert(arrayStringMap.get(sampleArray1) === undefined);
17+
})
18+
it ("Empty map has returns false", () => {
19+
assert(!arrayStringMap.has(sampleArray1));
20+
})
21+
it ("Empty map entries returns empty array", () => {
22+
assert([...arrayStringMap.entries()].length === 0);
1623
})
1724
})

0 commit comments

Comments
 (0)