Source code
Revision control
Copy as Markdown
Other Tools
Test Info: Warnings
- This test has a WPT meta file that expects 4 subtest issues.
- This WPT test may be referenced by the following Test IDs:
- /html/semantics/scripting-1/the-script-element/text-module/ignore-extension.any.html - WPT Dashboard Interop Dashboard
- /html/semantics/scripting-1/the-script-element/text-module/ignore-extension.any.sharedworker.html - WPT Dashboard Interop Dashboard
- /html/semantics/scripting-1/the-script-element/text-module/ignore-extension.any.worker.html - WPT Dashboard Interop Dashboard
// META: global=window,dedicatedworker,sharedworker
for (const name of ["file", "file.js", "file.json", "file.txt"]) {
promise_test(async t => {
const result = await import(`./${name}`, { with: { type: "text" } });
assert_equals(result, "text file\n");
}, `Extension: ${name}`);
}