mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-08-30 22:28:22 +00:00
Everywhere: Hoist the Libraries folder to the top-level
This commit is contained in:
parent
950e819ee7
commit
93712b24bf
Notes:
github-actions[bot]
2024-11-10 11:51:52 +00:00
Author: https://github.com/trflynn89
Commit: 93712b24bf
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/2256
Reviewed-by: https://github.com/sideshowbarker
4547 changed files with 104 additions and 113 deletions
21
Libraries/LibJS/Tests/global-var-let-const.js
Normal file
21
Libraries/LibJS/Tests/global-var-let-const.js
Normal file
|
@ -0,0 +1,21 @@
|
|||
var foo = 1;
|
||||
let bar = 2;
|
||||
const baz = 3;
|
||||
|
||||
test("behavior of program-level var/let/const", () => {
|
||||
expect(foo).toBe(1);
|
||||
expect(bar).toBe(2);
|
||||
expect(baz).toBe(3);
|
||||
expect(globalThis.foo).toBe(1);
|
||||
expect(globalThis.bar).toBeUndefined();
|
||||
expect(globalThis.baz).toBeUndefined();
|
||||
globalThis.foo = 4;
|
||||
globalThis.bar = 5;
|
||||
globalThis.baz = 6;
|
||||
expect(foo).toBe(4);
|
||||
expect(bar).toBe(2);
|
||||
expect(baz).toBe(3);
|
||||
expect(globalThis.foo).toBe(4);
|
||||
expect(globalThis.bar).toBe(5);
|
||||
expect(globalThis.baz).toBe(6);
|
||||
});
|
Loading…
Add table
Add a link
Reference in a new issue