(a, b)
| 114 | |
| 115 | # should raise JS error when mixing a BigInt with a number in arithmetic operations |
| 116 | def should_js_error(a, b): |
| 117 | with pytest.raises(pm.SpiderMonkeyError, match="can't convert BigInt to number"): |
| 118 | add(a, b) |
| 119 | should_js_error(pm.bigint(0), 0) |
| 120 | should_js_error(pm.bigint(1), 2) |
| 121 | should_js_error(3, pm.bigint(4)) |
no test coverage detected