| 1 | <html> |
| 2 | <head> |
| 3 | <link rel="stylesheet" href="../../../../../node_modules/mocha/mocha.css" /> |
| 4 | <meta name="manual-polyfills" /> |
| 5 | <script> |
| 6 | // Remove Shadow DOM |
| 7 | delete window.Element.prototype.assignedSlot; |
| 8 | delete window.Element.prototype.attachShadow; |
| 9 | delete window.Element.prototype.shadowRoot; |
| 10 | delete window.HTMLSlotElement; |
| 11 | delete window.ShadowRoot; |
| 12 | delete window.Text.prototype.assignedSlot; |
| 13 | |
| 14 | // Remove Custom Elements |
| 15 | delete window.CustomElementRegistry; |
| 16 | delete window.customElements; |
| 17 | </script> |
| 18 | <script src="../../../../../node_modules/@webcomponents/webcomponentsjs/webcomponents-bundle.js"></script> |
| 19 | </head> |
| 20 | |
| 21 | <body> |
| 22 | <script type="module"> |
| 23 | // node resolution doesn't seem to be working here. |
| 24 | import { |
| 25 | mocha, |
| 26 | sessionFinished, |
| 27 | sessionFailed, |
| 28 | } from '../../../../../node_modules/@web/test-runner-mocha/dist/standalone.js'; |
| 29 | // import { mocha, sessionFinished, sessionFailed } from '@web/test-runner-mocha'; |
| 30 | |
| 31 | (async () => { |
| 32 | try { |
| 33 | // setup mocha |
| 34 | mocha.setup({ui: 'tdd', timeout: 60000}); |
| 35 | |
| 36 | // or import your test file |
| 37 | await import('./lit-html-no-wc_html-test.js'); |
| 38 | |
| 39 | // run the tests, and notify the test runner after finishing |
| 40 | mocha.run(() => { |
| 41 | sessionFinished(); |
| 42 | }); |
| 43 | } catch (error) { |
| 44 | console.error(error); |
| 45 | // notify the test runner about errors |
| 46 | sessionFailed(error); |
| 47 | } |
| 48 | })(); |
| 49 | </script> |
| 50 | <div id="mocha"></div> |
| 51 | </body> |
| 52 | </html> |