File size: 1,377 Bytes
af6912c
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
<!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="utf-8" />
	<title>Audio Tests</title>
	<meta name="viewport" content="width=device-width, initial-scale=1.0" />
	<link rel="stylesheet" href="../node_modules/mocha/mocha.css" />
	<link rel="stylesheet" href="../abcjs-audio.css" />
</head>
<body>
<p class="intro">These tests use the AudioContext which must be started after a user interaction, so you
need to click the button below to do the testing.</p>
<button class="intro start-test">Start Test</button>
<div id="mocha"></div>
<div id="paper"></div>
<div id="midi"></div>
<div id="paper2"></div>
<div id="midi2"></div>
<script src="../node_modules/chai/chai.js"></script>
<script src="../node_modules/mocha/mocha.js"></script>
<script class="mocha-init">
	mocha.setup({ui: 'bdd', globals: ['__VUE_DEVTOOLS_TOAST__', 'abcjsAudioContext']});
	mocha.checkLeaks();
</script>

<script src="synth/synth.test.js"></script>

<script src="../node_modules/@tarp/require/require.min.js"></script>
<script>
	Tarp.require({main: "../index.js"}).then(function (response) {
		window.abcjs = response;

		var el = document.querySelector(".start-test");
		el.addEventListener("click", function() {
			var els = document.querySelectorAll(".intro")
			for (var i = 0; i < els.length; i++) {
				els[i].style = "display:none;";
			}
			mocha.run();
		});
	});
</script>

</body>
</html>