-
Notifications
You must be signed in to change notification settings - Fork 0
/
unittest.html
31 lines (25 loc) · 971 Bytes
/
unittest.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>JSY Transpile Mocha Tests</title>
<link rel='stylesheet' href='https://unpkg.com/mocha@5.2.0/mocha.css' />
<script crossorigin src='https://unpkg.com/mocha@5.2.0/mocha.js'></script>
<script crossorigin src='https://unpkg.com/chai@4.1.2/chai.js'></script>
<script crossorigin src='https://unpkg.com/acorn@5.7.2/dist/acorn.js'></script>
<script crossorigin src='https://unpkg.com/source-map@0.7.3/dist/source-map.js'></script>
</head>
<body>
<div id="mocha"></div>
<script type=module>
import { jsy_transpile } from './esm/index.js'
window.jsy_transpile = jsy_transpile
window.mocha.setup({ ui: 'bdd' })
window['source-map'] = window.sourceMap
window.require = module => window[module]
window.unittest_root = window.location // new URL('https://unpkg.com/jsy-transpile/')
import('./test/__unittest.iife.js', unittest_root)
.then(() => mocha.run())
</script>
</body>
</html>