1- import { getArrayValue } from "../src/get_array_value " ;
1+ import { updateArrayDataFromChangedElement } from "../src/update_array_data " ;
22
33
44describe ( 'getArrayValue' , ( ) => {
@@ -7,11 +7,11 @@ describe('getArrayValue', () => {
77 input . type = 'checkbox' ;
88 input . checked = true ;
99
10- expect ( getArrayValue ( input , 'foo' , null ) )
10+ expect ( updateArrayDataFromChangedElement ( input , 'foo' , null ) )
1111 . toEqual ( [ 'foo' ] ) ;
12- expect ( getArrayValue ( input , 'foo' , [ ] ) )
12+ expect ( updateArrayDataFromChangedElement ( input , 'foo' , [ ] ) )
1313 . toEqual ( [ 'foo' ] ) ;
14- expect ( getArrayValue ( input , 'foo' , [ 'bar' ] ) )
14+ expect ( updateArrayDataFromChangedElement ( input , 'foo' , [ 'bar' ] ) )
1515 . toEqual ( [ 'bar' , 'foo' ] ) ;
1616 } )
1717
@@ -20,13 +20,13 @@ describe('getArrayValue', () => {
2020 input . type = 'checkbox' ;
2121 input . checked = false ;
2222
23- expect ( getArrayValue ( input , 'foo' , null ) )
23+ expect ( updateArrayDataFromChangedElement ( input , 'foo' , null ) )
2424 . toEqual ( [ ] ) ;
25- expect ( getArrayValue ( input , 'foo' , [ 'foo' ] ) )
25+ expect ( updateArrayDataFromChangedElement ( input , 'foo' , [ 'foo' ] ) )
2626 . toEqual ( [ ] ) ;
27- expect ( getArrayValue ( input , 'foo' , [ 'bar' ] ) )
27+ expect ( updateArrayDataFromChangedElement ( input , 'foo' , [ 'bar' ] ) )
2828 . toEqual ( [ 'bar' ] ) ;
29- expect ( getArrayValue ( input , 'foo' , [ 'foo' , 'bar' ] ) )
29+ expect ( updateArrayDataFromChangedElement ( input , 'foo' , [ 'foo' , 'bar' ] ) )
3030 . toEqual ( [ 'bar' ] ) ;
3131 } )
3232
@@ -40,15 +40,15 @@ describe('getArrayValue', () => {
4040 barOption . value = 'bar' ;
4141 select . add ( barOption ) ;
4242
43- expect ( getArrayValue ( select , '' , null ) )
43+ expect ( updateArrayDataFromChangedElement ( select , '' , null ) )
4444 . toEqual ( [ ] ) ;
4545
4646 fooOption . selected = true ;
47- expect ( getArrayValue ( select , '' , null ) )
47+ expect ( updateArrayDataFromChangedElement ( select , '' , null ) )
4848 . toEqual ( [ 'foo' ] ) ;
4949
5050 barOption . selected = true ;
51- expect ( getArrayValue ( select , '' , null ) )
51+ expect ( updateArrayDataFromChangedElement ( select , '' , null ) )
5252 . toEqual ( [ 'foo' , 'bar' ] ) ;
5353 } )
5454} ) ;
0 commit comments