Skip to content

Commit b600336

Browse files
committed
Added smoke test for version
1 parent 477fbf6 commit b600336

File tree

1 file changed

+28
-0
lines changed

1 file changed

+28
-0
lines changed

test/interpreter.html

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
<!DOCTYPE html>
2+
<html lang="en">
3+
<head>
4+
<meta charset="UTF-8">
5+
<meta name="viewport" content="width=device-width, initial-scale=1.0">
6+
<style>
7+
mpy-script { display: none; }
8+
script-mpy { display: block; }
9+
</style>
10+
<script type="module">
11+
import { define } from '/core.js';
12+
define('mpy', {
13+
interpreter: 'micropython',
14+
// version: '1.20.0-295',
15+
// version: 'https://cdn.jsdelivr.net/npm/@micropython/[email protected]/micropython.mjs',
16+
onInterpreterReady({ run }, element) {
17+
run(`
18+
import sys
19+
print(sys.version)
20+
`);
21+
}
22+
});
23+
</script>
24+
</head>
25+
<body>
26+
<script type="mpy"></script>
27+
</body>
28+
</html>

0 commit comments

Comments
 (0)