Skip to content

Commit 1fa5209

Browse files
🔍 test: Increase coverage of ZZ.from.
1 parent 95df435 commit 1fa5209

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

test/src/ZZ/from.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,12 @@ test( 'ZZ.from()' , t => {
1818
t.is( ZZ.from(1===0).toString() , '0' ) ;
1919
t.is( ZZ.from('+10').toString() , '10' ) ;
2020

21+
t.is( ZZ.from(7, undefined, -1).valueOf() , -7 ) ;
22+
t.is( ZZ.from("7", 8, -1).valueOf() , -7 ) ;
23+
t.is( ZZ.from("-7", 8, -1).valueOf() , 7 ) ;
24+
t.is( ZZ.from("17", 8, -1).valueOf() , -15 ) ;
25+
t.is( ZZ.from("-17", 8, -1).valueOf() , 15 ) ;
26+
2127
t.is( ZZ.from( [ 0 , 1 ] ).toString() , ZZ.base.toString() ) ;
2228

2329
t.is( MAX_NUMBER.toString() , ZZ.from(MAX_NUMBER).toString() ) ;

0 commit comments

Comments
 (0)