Skip to content

Commit c3b97d9

Browse files
committed
Ensure that p5 runs internal init hooks before the tests begin
1 parent dfa60a8 commit c3b97d9

File tree

1 file changed

+9
-6
lines changed

1 file changed

+9
-6
lines changed

test/index.html

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,17 +2,20 @@
22
<head>
33
<meta charset="utf-8">
44
<title>TESTS</title>
5-
<script src="../lib/p5.js"></script>
6-
<script src="../lib/p5.sound.js"></script>
7-
5+
<script src="../lib/p5.js"></script>
6+
<script src="../lib/p5.sound.js"></script>
7+
<script>
8+
window.setup = function setup() {};
9+
new p5();
10+
</script>
811
<script src="./testDeps/mocha.js"></script>
912
<script data-main="test.js" src="./testDeps/require.js"></script>
10-
11-
1213
<link rel="stylesheet" href="./testDeps/mocha.css" />
1314
</head>
1415
<body>
1516
<div id="mocha"></div>
16-
<script>mocha.setup('bdd')</script>
17+
<script>
18+
mocha.setup('bdd')
19+
</script>
1720
</body>
1821
</html>

0 commit comments

Comments
 (0)