Skip to content

Commit

Permalink
Merge pull request 0xfe#1573 from ronyeh/qunit-1
Browse files Browse the repository at this point in the history
Qunit Fixes/Improvements
  • Loading branch information
rvilarl authored Jun 3, 2023
2 parents 253f769 + 8cf0d30 commit 1c65555
Show file tree
Hide file tree
Showing 4 changed files with 7,556 additions and 17 deletions.
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,8 @@
"entry",
"tests/flow.html",
"tests/flow.css",
"tests/support",
"tests/qunit/qunit.css",
"tests/qunit/qunit.js",
"releases/vexflow-min.js",
"releases/vexflow-debug.js",
"AUTHORS.md"
Expand Down
29 changes: 13 additions & 16 deletions tests/flow.html
Original file line number Diff line number Diff line change
Expand Up @@ -7,25 +7,27 @@
Use flow-old-browser.html instead.
-->
<head>
<title>VexFlow - JavaScript Music Notation and Guitar Tab</title>
<title>VexFlow Tests</title>
<link rel="stylesheet" href="flow.css" type="text/css" media="screen" />
<link rel="stylesheet" href="../node_modules/qunit/qunit/qunit.css" type="text/css" media="screen" />
<link rel="stylesheet" href="qunit/qunit.css" />
<script src="qunit/qunit.js"></script>
<meta charset="UTF-8" />
</head>
<body>
<div style="text-align: center; margin-top: 180px">
<h2>[ <a href="https://vexflow.com">Home</a> ] [ <a href="https://github.com/0xfe/vexflow">GitHub</a> ]</h2>
<h3>
Please wait a moment while the tests run....<br /><br />
See the: <a id="vex-src" target="_blank"></a>. Don't forget to run the
<a href="https://github.com/0xfe/vexflow/wiki/Visual-Regression-Tests">Visual Regression Tests</a>!
</h3>
</div>
<div style="text-align: center">
<div id="qunit"></div>
<div id="qunit-fixture"></div>
<div>
<h2>[ <a href="https://vexflow.com">Home</a> ] [ <a href="https://github.com/0xfe/vexflow">GitHub</a> ]</h2>
<h3>
See the: <a id="vex-src" target="_blank"></a>. Don't forget to run the
<a href="https://github.com/0xfe/vexflow/wiki/Visual-Regression-Tests">Visual Regression Tests</a>!
</h3>
</div>
<p>&nbsp;</p>
<div id="vexflow_testoutput"></div>
<p>&nbsp;</p>
</div>
<div style="text-align: center">
<p class="vf-footer">
[ <a href="https://vexflow.com">Home</a> ] [ <a href="https://github.com/0xfe/vexflow">GitHub</a> ] [
<a href="https://muthanna.com/">0xfe</a> ]
Expand Down Expand Up @@ -147,10 +149,6 @@ <h3>
// document.fonts.forEach((fontFace) => console.log(fontFace));
}

// Load qunit.js as late as possible to avoid a race condition!
// The QUnit module drop down box doesn't appear if Vex.Flow.Test.runTests() runs too late.
await loadScript('../node_modules/qunit/qunit/qunit.js');

// Optionally specify the QUnit module or filter in the fragment identifier.
if (hashParams) {
if (hashParams.has('module')) {
Expand All @@ -164,7 +162,6 @@ <h3>
// Show only failed tests.
QUnit.config.hidepassed = true;
QUnit.config.noglobals = true;
QUnit.start();
VF.Test.run();
</script>
</body>
Expand Down
Loading

0 comments on commit 1c65555

Please sign in to comment.