mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-11-08 09:11:01 +00:00
23 lines
497 B
JavaScript
23 lines
497 B
JavaScript
|
|
test("Issue #3641, strict mode should be function- or program-level, not block-level", () => {
|
||
|
|
function func() {
|
||
|
|
expect(isStrictMode()).toBeFalse();
|
||
|
|
|
||
|
|
{
|
||
|
|
"use strict";
|
||
|
|
expect(isStrictMode()).toBeFalse();
|
||
|
|
}
|
||
|
|
|
||
|
|
if (true) {
|
||
|
|
"use strict";
|
||
|
|
expect(isStrictMode()).toBeFalse();
|
||
|
|
}
|
||
|
|
|
||
|
|
do {
|
||
|
|
"use strict";
|
||
|
|
expect(isStrictMode()).toBeFalse();
|
||
|
|
} while (false);
|
||
|
|
}
|
||
|
|
|
||
|
|
func();
|
||
|
|
});
|