mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 04:37:34 +00:00
LibJS/Tests: Set failing bytecode tests as xfail when in bytecode mode
This should allow us to enable running test-js in bytecode mode in CI.
This commit is contained in:
parent
9b66e87bd8
commit
d766014787
17 changed files with 145 additions and 110 deletions
|
@ -1,5 +1,5 @@
|
|||
describe("basic usage", () => {
|
||||
test("using in normal for loop", () => {
|
||||
test.xfailIf(isBytecodeInterpreterEnabled(), "using in normal for loop", () => {
|
||||
let isDisposed = false;
|
||||
let lastI = -1;
|
||||
for (
|
||||
|
@ -27,7 +27,7 @@ describe("basic usage", () => {
|
|||
expect(lastI).toBe(2);
|
||||
});
|
||||
|
||||
test("using in normal for loop with expression body", () => {
|
||||
test.xfailIf(isBytecodeInterpreterEnabled(), "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("using in for of loop", () => {
|
||||
test.xfailIf(isBytecodeInterpreterEnabled(), "using in for of loop", () => {
|
||||
const disposable = [];
|
||||
const values = [];
|
||||
|
||||
|
@ -75,7 +75,7 @@ describe("basic usage", () => {
|
|||
expect(disposable).toEqual(['a', 'b', 'c']);
|
||||
});
|
||||
|
||||
test("using in for of loop with expression body", () => {
|
||||
test.xfailIf(isBytecodeInterpreterEnabled(), "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("can have multiple declaration in normal for loop", () => {
|
||||
test.xfailIf(isBytecodeInterpreterEnabled(), "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("can have using in block in for loop", () => {
|
||||
test.xfailIf(isBytecodeInterpreterEnabled(), "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("can have using in block in for-in loop", () => {
|
||||
test.xfailIf(isBytecodeInterpreterEnabled(), "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("dispose is called even if throw in for of loop", () => {
|
||||
test.xfailIf(isBytecodeInterpreterEnabled(), "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("using using of", () => {
|
||||
test.xfailIf(isBytecodeInterpreterEnabled(), "using using of", () => {
|
||||
let enteredLoop = false;
|
||||
for (using using of [null]) {
|
||||
enteredLoop = true;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue