MCPcopy Create free account
hub / github.com/Distributive-Network/PythonMonkey / should_js_error

Function should_js_error

tests/python/test_bigints.py:116–118  ·  view source on GitHub ↗
(a, b)

Source from the content-addressed store, hash-verified

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))

Callers 1

Calls 1

addFunction · 0.70

Tested by

no test coverage detected