mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 05:07:34 +00:00
LibJS: Disallow duplicated variable declarations
This commit is contained in:
parent
5cc518f07a
commit
40b8689f9b
4 changed files with 62 additions and 4 deletions
|
@ -15,12 +15,12 @@ test("basic functionality", () => {
|
|||
});
|
||||
|
||||
test("casts |this| to string", () => {
|
||||
const it = String.prototype[Symbol.iterator].call(45);
|
||||
let it = String.prototype[Symbol.iterator].call(45);
|
||||
expect(it.next()).toEqual({ value: "4", done: false });
|
||||
expect(it.next()).toEqual({ value: "5", done: false });
|
||||
expect(it.next()).toEqual({ value: undefined, done: true });
|
||||
|
||||
const it = String.prototype[Symbol.iterator].call(false);
|
||||
it = String.prototype[Symbol.iterator].call(false);
|
||||
expect(it.next()).toEqual({ value: "f", done: false });
|
||||
expect(it.next()).toEqual({ value: "a", done: false });
|
||||
expect(it.next()).toEqual({ value: "l", done: false });
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue