• Home
  • Raw
  • Download

Lines Matching refs:shouldBe

76 shouldBe("var a = []; a.length = 1; showHoles(a)", "'[hole]'");
77 shouldBe("var a = []; a[0] = undefined; showHoles(a)", "'[undefined]'");
78 shouldBe("var a = []; a[0] = undefined; delete a[0]; showHoles(a)", "'[hole]'");
80 shouldBe("showHoles([0, , 2])", "'[0, hole, 2]'");
81 shouldBe("showHoles([0, 1, ,])", "'[0, 1, hole]'");
82 shouldBe("showHoles([0, , 2].concat([3, , 5]))", "'[0, hole, 2, 3, hole, 5]'");
83 shouldBe("showHoles([0, , 2, 3].reverse())", "'[3, 2, hole, 0]'");
84 shouldBe("a = [0, , 2, 3]; a.shift(); showHoles(a)", "'[hole, 2, 3]'");
85 shouldBe("showHoles([0, , 2, 3].slice(0, 3))", "'[0, hole, 2]'");
86 shouldBe("showHoles([0, , 2, 3].sort())", "'[0, 2, 3, hole]'");
87 shouldBe("showHoles([0, undefined, 2, 3].sort())", "'[0, 2, 3, undefined]'");
88 shouldBe("a = [0, , 2, 3]; a.splice(2, 3, 5, 6); showHoles(a)", "'[0, hole, 5, 6]'");
89 shouldBe("a = [0, , 2, 3]; a.unshift(4); showHoles(a)", "'[4, 0, hole, 2, 3]'");
90 shouldBe("showHoles([0, , 2, 3].filter(returnTrue))", "'[0, 2, 3]'");
91 shouldBe("showHoles([0, undefined, 2, 3].filter(returnTrue))", "'[0, undefined, 2, 3]'");
92 shouldBe("showHoles([0, , 2, 3].map(returnTrue))", "'[true, hole, true, true]'");
93 shouldBe("showHoles([0, undefined, 2, 3].map(returnTrue))", "'[true, true, true, true]'");
94 shouldBe("a = []; [0, , 2, 3].every(addToArrayReturnTrue); showHoles(a)", "'[0, 2, 3]'");
95 shouldBe("a = []; [0, undefined, 2, 3].every(addToArrayReturnTrue); showHoles(a)", "'[0, undefined,…
96 shouldBe("a = []; [0, , 2, 3].forEach(addToArray); showHoles(a)", "'[0, 2, 3]'");
97 shouldBe("a = []; [0, undefined, 2, 3].forEach(addToArray); showHoles(a)", "'[0, undefined, 2, 3]'"…
98 shouldBe("a = []; [0, , 2, 3].some(addToArrayReturnFalse); showHoles(a)", "'[0, 2, 3]'");
99 shouldBe("a = []; [0, undefined, 2, 3].some(addToArrayReturnFalse); showHoles(a)", "'[0, undefined,…
100 shouldBe("[0, , 2, 3].indexOf()", "-1");
101 shouldBe("[0, undefined, 2, 3].indexOf()", "1");
102 shouldBe("[0, , 2, 3].lastIndexOf()", "-1");
103 shouldBe("[0, undefined, 2, 3].lastIndexOf()", "1");
107 shouldBe("showHoles([0, , 2])", "'[0, hole, 2]'");
108 shouldBe("showHoles([0, 1, ,])", "'[0, 1, hole]'");
109 shouldBe("showHoles([0, , 2].concat([3, , 5]))", "'[0, peekaboo, 2, 3, peekaboo, 5]'");
110 shouldBe("showHoles([0, , 2, 3].reverse())", "'[3, 2, peekaboo, 0]'");
111 shouldBe("a = [0, , 2, 3]; a.shift(); showHoles(a)", "'[peekaboo, 2, 3]'");
112 shouldBe("showHoles([0, , 2, 3].slice(0, 3))", "'[0, peekaboo, 2]'");
113 shouldBe("showHoles([0, , 2, 3].sort())", "'[0, 2, 3, hole]'");
114 shouldBe("showHoles([0, undefined, 2, 3].sort())", "'[0, 2, 3, undefined]'");
115 shouldBe("a = [0, , 2, 3]; a.splice(2, 3, 5, 6); showHoles(a)", "'[0, hole, 5, 6]'");
116 shouldBe("a = [0, , 2, 3]; a.unshift(4); showHoles(a)", "'[4, 0, peekaboo, 2, 3]'");
117 shouldBe("showHoles([0, , 2, 3].filter(returnTrue))", "'[0, peekaboo, 2, 3]'");
118 shouldBe("showHoles([0, undefined, 2, 3].filter(returnTrue))", "'[0, undefined, 2, 3]'");
119 shouldBe("showHoles([0, , 2, 3].map(returnTrue))", "'[true, true, true, true]'");
120 shouldBe("showHoles([0, undefined, 2, 3].map(returnTrue))", "'[true, true, true, true]'");
121 shouldBe("a = []; [0, , 2, 3].every(addToArrayReturnTrue); showHoles(a)", "'[0, peekaboo, 2, 3]'");
122 shouldBe("a = []; [0, undefined, 2, 3].every(addToArrayReturnTrue); showHoles(a)", "'[0, undefined,…
123 shouldBe("a = []; [0, , 2, 3].forEach(addToArray); showHoles(a)", "'[0, peekaboo, 2, 3]'");
124 shouldBe("a = []; [0, undefined, 2, 3].forEach(addToArray); showHoles(a)", "'[0, undefined, 2, 3]'"…
125 shouldBe("a = []; [0, , 2, 3].some(addToArrayReturnFalse); showHoles(a)", "'[0, peekaboo, 2, 3]'");
126 shouldBe("a = []; [0, undefined, 2, 3].some(addToArrayReturnFalse); showHoles(a)", "'[0, undefined,…
127 shouldBe("[0, , 2, 3].indexOf()", "-1");
128 shouldBe("[0, , 2, 3].indexOf('peekaboo')", "1");
129 shouldBe("[0, undefined, 2, 3].indexOf()", "1");
130 shouldBe("[0, , 2, 3].lastIndexOf()", "-1");
131 shouldBe("[0, , 2, 3].lastIndexOf('peekaboo')", "1");
132 shouldBe("[0, undefined, 2, 3].lastIndexOf()", "1");