Skip to content

Commit

Permalink
Add a test to check #42.
Browse files Browse the repository at this point in the history
  • Loading branch information
yunabe committed May 25, 2023
1 parent e8d337b commit dcbf2b3
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions src/executor.spec.ts
Expand Up @@ -424,6 +424,15 @@ describe("execute", () => {
expect(await ex.execute(`let b = {}.constructor === Object`)).toBe(true);
expect(ex.locals.b).toEqual(true);
});

it("check bug#42", async () => {
// Checks if https://github.com/yunabe/tslab/issues/42 is reproducible in CI.
expect(
await ex.execute(`let person = new Object(); person['name'] = 'yunabe';`)
).toBe(true);
expect(consoleErrorCalls).toEqual([]);
expect(ex.locals.person).toEqual({ name: "yunabe" });
});
});

describe("interrupt", () => {
Expand Down

0 comments on commit dcbf2b3

Please sign in to comment.