Skip to content

Commit c4abc61

Browse files
Test for #47
1 parent dbc03c7 commit c4abc61

File tree

1 file changed

+31
-0
lines changed

1 file changed

+31
-0
lines changed

test/TestStacktrace.js

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -578,6 +578,37 @@
578578
f2();
579579
}
580580
});
581+
582+
test("other in strict mode", function() {
583+
var results = [];
584+
var p = impl();
585+
586+
function f1() {
587+
try {
588+
this.undef();
589+
} catch (e) {
590+
debugger;
591+
results = p.run(e, 'other');
592+
}
593+
}
594+
595+
function f2() {
596+
f1();
597+
}
598+
599+
function f3() {
600+
"use strict";
601+
f2();
602+
}
603+
604+
f3();
605+
606+
ok(results.length >= 3, 'Stack should contain at least 3 frames in non-strict mode');
607+
//equals(results, '', 'debug');
608+
equals(results[1], 'f1()');
609+
equals(results[2], 'f2()');
610+
});
611+
581612
//endregion
582613

583614
//region util

0 commit comments

Comments
 (0)