Web Inspector: Make Console's Execution Context picker stand out when it is non-default
[WebKit-https.git] / JSTests / stress / big-int-prototype-to-string-exception.js
1 //@ runBigIntEnabled
2
3 function assert(a) {
4     if (!a)
5         throw new Error("Bad assertion");
6 }
7
8 let o = {
9     valueOf: () => {
10         throw new Error("Bad");
11         return 2;
12     }
13 }
14
15 let a = 20n;
16 try {
17     a.toString(o);
18     assert(false);
19 } catch (e) {
20     assert(e.message == "Bad");
21 }
22