Skip to content

Commit 1e6fc13

Browse files
test ZeroDivisionError#toString
1 parent aefe635 commit 1e6fc13

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

test/src/Integer/arithmetic.js

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -212,3 +212,16 @@ test( 'add and subtract with 0' , t => {
212212
t.is( b.sub(b).toString(10) , '0' ) ;
213213

214214
}) ;
215+
216+
test ( 'catch ZeroDivisionError' , t => {
217+
218+
t.plan(1);
219+
220+
try {
221+
ZZ.$1().div(ZZ.$0()) ;
222+
}
223+
catch ( e ) {
224+
t.is( e.toString().substring(0, 17) , 'ZeroDivisionError' ) ;
225+
}
226+
227+
}) ;

0 commit comments

Comments
 (0)