Skip to content

Commit 96f5ab6

Browse files
Collapsible code regions for WebStorm
1 parent 342ce18 commit 96f5ab6

File tree

1 file changed

+13
-4
lines changed

1 file changed

+13
-4
lines changed

test/TestStacktrace.js

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020
//
2121

2222
(function(window, document, undefined) {
23+
//region setup
2324
var pst = printStackTrace.implementation.prototype;
2425

2526
var impl = function() {
@@ -58,7 +59,9 @@
5859
}
5960
}
6061
};
62+
//endregion
6163

64+
//region invocation
6265
module("invocation");
6366

6467
test("printStackTrace", function() {
@@ -78,7 +81,9 @@
7881
guess: true
7982
});
8083
});
84+
//endregion
8185

86+
//region mode
8287
module("mode");
8388

8489
test("mode", function() {
@@ -547,15 +552,16 @@
547552
}
548553
}
549554
}], 'FUNCTION f1 (a,b,c)', frame_f2);
555+
550556
expect(mode == 'other' ? 4 : 2);
551557
var message = pst.other(frame_f1);
552-
var message_string = message.join("\n");
553558
equals(message[0].indexOf('f1(1,"abc",#function,#object)') >= 0, true, 'f1');
554559
equals(message[1].indexOf('{anonymous}()') >= 0, true, 'f2 anonymous');
560+
555561
if (mode == 'other') {
556562
function f1(arg1, arg2) {
557-
var message = pst.other(arguments.callee), message_string = message.join("\n");
558-
//equals(message_string, '', 'debug');
563+
var message = pst.other(arguments.callee);
564+
//equals(message.join("\n"), '', 'debug');
559565
equals(message[0].indexOf('f1(1,"abc",#function,#object)') >= 0, true, 'f1');
560566
equals(message[1].indexOf('{anonymous}()') >= 0, true, 'f2 anonymous');
561567
}
@@ -572,7 +578,9 @@
572578
f2();
573579
}
574580
});
581+
//endregion
575582

583+
//region util
576584
module("util");
577585

578586
test("stringify", function() {
@@ -807,7 +815,7 @@
807815
this.undef();
808816
} catch (e) {
809817
if (p.mode(e) == 'opera11') {
810-
results.push(p.run());
818+
results.push(p.run(e));
811819
}
812820
}
813821
};
@@ -845,4 +853,5 @@
845853
equals(p.guessAnonymousFunctions(results[i])[0].indexOf('{anonymous}'), 0, 'no file and line number in "other" mode');
846854
}
847855
});
856+
//endregion
848857
})(window, document);

0 commit comments

Comments
 (0)