1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 14:28:12 +00:00

LibJS: Remove bytecode condition from tests expected to fail

This commit is contained in:
Timothy Flynn 2023-08-09 15:14:05 -04:00 committed by Luke Wilde
parent 854330ec73
commit 375a6f5dd9
17 changed files with 143 additions and 186 deletions

View file

@ -1,5 +1,5 @@
describe("basic usage", () => {
test.xfailIf(isBytecodeInterpreterEnabled(), "using in normal for loop", () => {
test.xfail("using in normal for loop", () => {
let isDisposed = false;
let lastI = -1;
for (
@ -27,7 +27,7 @@ describe("basic usage", () => {
expect(lastI).toBe(2);
});
test.xfailIf(isBytecodeInterpreterEnabled(), "using in normal for loop with expression body", () => {
test.xfail("using in normal for loop with expression body", () => {
let isDisposed = false;
let outerI = 0;
for (
@ -53,7 +53,7 @@ describe("basic usage", () => {
expect(outerI).toBe(3);
});
test.xfailIf(isBytecodeInterpreterEnabled(), "using in for of loop", () => {
test.xfail("using in for of loop", () => {
const disposable = [];
const values = [];
@ -75,7 +75,7 @@ describe("basic usage", () => {
expect(disposable).toEqual(['a', 'b', 'c']);
});
test.xfailIf(isBytecodeInterpreterEnabled(), "using in for of loop with expression body", () => {
test.xfail("using in for of loop with expression body", () => {
let disposableCalls = 0;
let i = 0;
@ -91,7 +91,7 @@ describe("basic usage", () => {
expect(disposableCalls).toBe(3);
});
test.xfailIf(isBytecodeInterpreterEnabled(), "can have multiple declaration in normal for loop", () => {
test.xfail("can have multiple declaration in normal for loop", () => {
let disposed = 0;
const a = {
[Symbol.dispose]() {
@ -106,7 +106,7 @@ describe("basic usage", () => {
expect(disposed).toBe(2);
});
test.xfailIf(isBytecodeInterpreterEnabled(), "can have using in block in for loop", () => {
test.xfail("can have using in block in for loop", () => {
const disposed = [];
const values = [];
for (let i = 0; i < 3; i++) {
@ -123,7 +123,7 @@ describe("basic usage", () => {
expect(disposed).toEqual([0, 1, 2]);
});
test.xfailIf(isBytecodeInterpreterEnabled(), "can have using in block in for-in loop", () => {
test.xfail("can have using in block in for-in loop", () => {
const disposed = [];
const values = [];
for (const i in ['a', 'b', 'c']) {
@ -140,7 +140,7 @@ describe("basic usage", () => {
expect(disposed).toEqual(["0", "1", "2"]);
});
test.xfailIf(isBytecodeInterpreterEnabled(), "dispose is called even if throw in for of loop", () => {
test.xfail("dispose is called even if throw in for of loop", () => {
let disposableCalls = 0;
const obj = {
@ -209,7 +209,7 @@ describe("using is still a valid variable in loops", () => {
expect(enteredLoop).toBeTrue();
});
test.xfailIf(isBytecodeInterpreterEnabled(), "using using of", () => {
test.xfail("using using of", () => {
let enteredLoop = false;
for (using using of [null]) {
enteredLoop = true;