no-dynamic-import.js (533B)
1 /** @type {[name: string, url: string][]} */ 2 const importUrlTests = [ 3 ["Module URL", "./basic-module.js"], 4 // In no-dynamic-import-in-module.any.js, this module is also statically imported 5 ["Another module URL", "./basic-module-2.js"], 6 [ 7 "Module data: URL", 8 "data:text/javascript;charset=utf-8," + 9 encodeURIComponent(`export default 'hello!';`), 10 ], 11 ]; 12 13 for (const [name, url] of importUrlTests) { 14 promise_test( 15 (t) => promise_rejects_js(t, TypeError, import(url), "Import must reject"), 16 name 17 ); 18 }