mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 17:27:35 +00:00
Libraries: Move to Userland/Libraries/
This commit is contained in:
parent
dc28c07fa5
commit
13d7c09125
1857 changed files with 266 additions and 274 deletions
25
Userland/Libraries/LibJS/Tests/strict-mode-blocks.js
Normal file
25
Userland/Libraries/LibJS/Tests/strict-mode-blocks.js
Normal file
|
@ -0,0 +1,25 @@
|
|||
test("Issue #3641, strict mode should be function- or program-level, not block-level", () => {
|
||||
function func() {
|
||||
expect(isStrictMode()).toBeFalse();
|
||||
|
||||
// prettier-ignore
|
||||
{
|
||||
"use strict";
|
||||
expect(isStrictMode()).toBeFalse();
|
||||
}
|
||||
|
||||
// prettier-ignore
|
||||
if (true) {
|
||||
"use strict";
|
||||
expect(isStrictMode()).toBeFalse();
|
||||
}
|
||||
|
||||
// prettier-ignore
|
||||
do {
|
||||
"use strict";
|
||||
expect(isStrictMode()).toBeFalse();
|
||||
} while (false);
|
||||
}
|
||||
|
||||
func();
|
||||
});
|
Loading…
Add table
Add a link
Reference in a new issue