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