@@ -40,7 +40,7 @@ describe("normal behavior", () => {
var array = [1, 2, 3, 4, 5];
expect(
- arrayTwo.every((value, index, arr) => {
+ array.every((value, index, arr) => {
arr.push(6);
return value <= 5;
})
@@ -127,7 +127,7 @@ test("evaluation order", () => {
b.hasBeenCalled = false;
c.hasBeenCalled = false;
expect(() => {
- new Function(`a[b()] ${op} c()`)();
+ new Function("a", "b", "c", "op", `a[b()] ${op} c()`)(a, b, c, op);
}).toThrow(Error);
expect(b.hasBeenCalled).toBeTrue();
expect(c.hasBeenCalled).toBeFalse();