Skip to content

Commit 2f88043

Browse files
committed
Add unit test coverage
1 parent 69d24eb commit 2f88043

File tree

1 file changed

+28
-0
lines changed

1 file changed

+28
-0
lines changed

test/Bugs/deferredStubBugs.js

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
//-------------------------------------------------------------------------------------------------------
55

66
let pass = 'pass';
7+
let fail = 'fail';
78

89
function func4(a = 123) {
910
function v8() {
@@ -56,3 +57,30 @@ var func11 = (a, b = () => { return pass; }, c) => {
5657
return func12();
5758
}
5859
console.log(func11()()());
60+
61+
function func13(a = (b = () => pass, c = () => fail) => b()) {
62+
return a();
63+
}
64+
console.log(func13());
65+
66+
function func14(a = (b = () => { return fail; }, c = () => { return pass; }) => { return c(); }) {
67+
return a();
68+
}
69+
console.log(func14());
70+
71+
function func15(a = class A { meth() { return pass } static meth2() { return fail; } }, b = v => fail, c = (v) => { return fail }, d = fail) {
72+
return new a().meth();
73+
}
74+
console.log(func15());
75+
function func16(a = class A { meth() { return fail } static meth2() { return pass; } }, b = v => fail, c = (v) => { return fail }, d = fail) {
76+
return a.meth2();
77+
}
78+
console.log(func16());
79+
function func17(a = class A { meth() { return fail } static meth2() { return fail; } }, b = v => pass, c = (v) => { return fail }, d = fail) {
80+
return b();
81+
}
82+
console.log(func17());
83+
function func18(a = class A { meth() { return fail } static meth2() { return fail; } }, b = v => fail, c = (v) => { return pass }, d = fail) {
84+
return c();
85+
}
86+
console.log(func18());

0 commit comments

Comments
 (0)