ladybird/Libraries/LibJS/Tests/modules/accessing-var-import-before-decl.mjs
Timothy Flynn 019c529c07 Meta: Increase the line length enforced by prettier to 120
This matches our coding style recommendation in CodingStyle.md, and
matches our python formatting.
2025-10-31 19:55:50 -04:00

15 lines
453 B
JavaScript

let passed = true;
if (importedVarValue !== undefined) throw new Error("Expected importedVarValue === undefined; got " + importedVarValue);
try {
importedVarValue = 0;
passed = false;
} catch (e) {
if (!(e instanceof TypeError)) throw new Error("Expected importedVarValue = 0; to throw TypeError got " + e);
}
import { value as importedVarValue } from "./accessing-var-import-before-decl.mjs";
export var value = 123;
export { passed };