diff options
Diffstat (limited to 'integration/snippets/public/index.html')
-rw-r--r-- | integration/snippets/public/index.html | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/integration/snippets/public/index.html b/integration/snippets/public/index.html index 74a744a7d..5358fa423 100644 --- a/integration/snippets/public/index.html +++ b/integration/snippets/public/index.html @@ -46,6 +46,23 @@ return await testFunction(); }; + + if (globalThis.location.pathname.endsWith("-test")) { + globalThis.testDone = (path) => alert(`test ${path} success`); + globalThis.testFail = (path) => alert(`!test ${path} fail`); + runTest( + globalThis.location.pathname.substring( + 0, + location.pathname.length - "-test".length + ) + ).then( + () => {}, + (err) => { + console.error(err); + alert(err.toString()); + } + ); + } </script> </body> </html> |