@@ -24,7 +24,7 @@ describe('utils', () => {
24
24
testInstersection ( new Set ( [ ] ) , new Set ( [ ] ) , false ) ;
25
25
} ) ;
26
26
27
- function testGetInstersection ( a : Set < any > , b : Set < any > , expected : any [ ] ) {
27
+ function testGetIntersection ( a : Set < any > , b : Set < any > , expected : any [ ] ) {
28
28
expect ( [ ...getIntersection ( a , b ) ] ) . toEqual ( expected ) ;
29
29
expect ( [ ...getIntersection ( b , a ) ] ) . toEqual ( expected ) ;
30
30
const mapA = new Map ( [ ...a ] . map ( ( v ) => [ v , 1 ] ) ) ;
@@ -35,14 +35,14 @@ describe('utils', () => {
35
35
}
36
36
37
37
test ( 'getIntersection' , async ( ) => {
38
- testGetInstersection ( new Set ( [ 'a' ] ) , new Set ( [ 'a' ] ) , [ 'a' ] ) ;
39
- testGetInstersection ( new Set ( [ 'a' , 'b' , 'c' ] ) , new Set ( [ 'a' , 'b' , 'c' ] ) , [ 'a' , 'b' , 'c' ] ) ;
40
- testGetInstersection ( new Set ( [ 'a' , 'b' , 'c' ] ) , new Set ( [ 'd' , 'e' ] ) , [ ] ) ;
41
- testGetInstersection ( new Set ( [ 'a' , 'b' , 'c' ] ) , new Set ( [ 'd' , 'c' , 'e' ] ) , [ 'c' ] ) ;
42
- testGetInstersection ( new Set ( [ 'a' , 'b' , 'c' ] ) , new Set ( [ 'c' , 'e' ] ) , [ 'c' ] ) ;
43
- testGetInstersection ( new Set ( [ 'a' , 'b' , 'c' , 2 ] ) , new Set ( [ 1 , 2 , 3 ] ) , [ 2 ] ) ;
44
- testGetInstersection ( new Set ( [ 'a' , 'b' , 'c' , 4 ] ) , new Set ( [ 1 , 2 , 3 ] ) , [ ] ) ;
45
- testGetInstersection ( new Set ( [ ] ) , new Set ( [ 1 , 2 , 3 ] ) , [ ] ) ;
46
- testGetInstersection ( new Set ( [ ] ) , new Set ( [ ] ) , [ ] ) ;
38
+ testGetIntersection ( new Set ( [ 'a' ] ) , new Set ( [ 'a' ] ) , [ 'a' ] ) ;
39
+ testGetIntersection ( new Set ( [ 'a' , 'b' , 'c' ] ) , new Set ( [ 'a' , 'b' , 'c' ] ) , [ 'a' , 'b' , 'c' ] ) ;
40
+ testGetIntersection ( new Set ( [ 'a' , 'b' , 'c' ] ) , new Set ( [ 'd' , 'e' ] ) , [ ] ) ;
41
+ testGetIntersection ( new Set ( [ 'a' , 'b' , 'c' ] ) , new Set ( [ 'd' , 'c' , 'e' ] ) , [ 'c' ] ) ;
42
+ testGetIntersection ( new Set ( [ 'a' , 'b' , 'c' ] ) , new Set ( [ 'c' , 'e' ] ) , [ 'c' ] ) ;
43
+ testGetIntersection ( new Set ( [ 'a' , 'b' , 'c' , 2 ] ) , new Set ( [ 1 , 2 , 3 ] ) , [ 2 ] ) ;
44
+ testGetIntersection ( new Set ( [ 'a' , 'b' , 'c' , 4 ] ) , new Set ( [ 1 , 2 , 3 ] ) , [ ] ) ;
45
+ testGetIntersection ( new Set ( [ ] ) , new Set ( [ 1 , 2 , 3 ] ) , [ ] ) ;
46
+ testGetIntersection ( new Set ( [ ] ) , new Set ( [ ] ) , [ ] ) ;
47
47
} ) ;
48
48
} ) ;
0 commit comments