| <!DOCTYPE HTML> |
| <html> |
| <head> |
| <script src="../../../resources/js-test-pre.js"></script> |
| </head> |
| <body> |
| <script> |
| description('Test import with non existing module.'); |
| |
| window.jsTestIsAsync = true; |
| </script> |
| <script src="../../../resources/js-test-post.js"></script> |
| <script> |
| var error = null; |
| (async function () { |
| try { |
| await import(`./resources/import-not-found.js`); |
| } catch (e) { |
| error = e; |
| } |
| shouldBeEqualToString(`String(error)`, `TypeError: Importing a module script failed.`); |
| finishJSTest(); |
| }()); |
| </script> |
| </body> |
| </html> |