Skip to content

Commit d436fd7

Browse files
authored
CLDR-17481 re-enable directly loading Test.html (#3584)
1 parent bf4baf6 commit d436fd7

File tree

3 files changed

+9
-20
lines changed

3 files changed

+9
-20
lines changed

tools/cldr-apps/js/package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
"main": "index.js",
66
"scripts": {
77
"build-test": "webpack --config webpack-test.config.js",
8+
"watch-test": "npm run build-test -- --watch",
89
"test": "npm run nonbrowser-test && npm run browser-test",
910
"nonbrowser-test": "mocha --reporter spec test/nonbrowser/test-*.mjs",
1011
"browser-test": "npm run build-test && mocha-headless-chrome -f test/Test.html",

tools/cldr-apps/js/test/Test.html

Lines changed: 8 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -16,17 +16,14 @@
1616
"
1717
>
1818
<h1>CLDR SurveyTool JavaScript Tests</h1>
19-
<script>
20-
if (location.protocol === "file:") {
21-
document.write(
22-
"<h1>Error</h1><p>The protocol should be <b>html:</b>, not <b>file:</b><br />A server is required; see <b>run.sh</b></p>"
23-
);
24-
}
25-
</script>
26-
<p>
27-
<em>Important:</em> run with run.sh; open the browser console to check
19+
<ul>
20+
<li>in the 'js' directory, run <code>npm i</code> to install</li>
21+
<li>To rebuild, run <code>npm run build-test</code></li>
22+
<li>If you want to continuously compile, keep <code>npm run watch-test</code> (control-C to cancel)</li>
23+
<li>open the browser console to check
2824
for errors/warnings that are otherwise invisible!
29-
</p>
25+
</li>
26+
</ul>
3027
<p><em>References:</em></p>
3128
<ul>
3229
<li>
@@ -43,7 +40,7 @@ <h1>CLDR SurveyTool JavaScript Tests</h1>
4340
</ul>
4441
</div>
4542
<div id="mocha" style="margin-top: 12pt"></div>
46-
<script src="https://unpkg.com/chai/chai.js"></script>
43+
<script src="https://unpkg.com/chai@4.3.6/chai.js"></script>
4744
<script src="https://unpkg.com/mocha/mocha.js"></script>
4845
<script class="mocha-init">
4946
mocha.setup("bdd");

tools/cldr-apps/js/test/run.sh

Lines changed: 0 additions & 9 deletions
This file was deleted.

0 commit comments

Comments
 (0)