1
1
import { assert } from "chai"
2
- import ArrayStringMap from "./arrayStringMap"
2
+ import ArrayStringMap from "./arrayStringMap.js "
3
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" ) ;
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 ) ;
16
23
} )
17
24
} )
0 commit comments