Skip to content

Commit a635e42

Browse files
committed
Final formatting changes, CONST_CASE fixes
1 parent da6d1d1 commit a635e42

File tree

1 file changed

+10
-10
lines changed

1 file changed

+10
-10
lines changed

utils/js/runtimeTests.js

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ const TEST_FILES = glob.sync(path.resolve(
3535
));
3636

3737
describe('Runtime tests', () => {
38-
for (const testUrl of TEST_FILES) {
38+
for (const testFile of TEST_FILES) {
3939
const logs = [];
4040
const passed = /PASSED/i;
4141
const failed = /FAILED/i;
@@ -54,26 +54,26 @@ describe('Runtime tests', () => {
5454
} else return msg;
5555
};
5656

57-
const testName = path.basename(testUrl);
58-
const TestIsFinished = new FutureEvent();
57+
const testName = path.basename(testFile);
58+
const testIsFinished = new FutureEvent();
5959
const virtualConsole = new VirtualConsole()
6060
.on('log', (msg) => {
6161
logs.push(chalkMsg(msg));
62-
if (/Tests complete/i.test(msg)) TestIsFinished.ready(allLogs());
63-
else if (/Tests failed/i.test(msg)) TestIsFinished.cancel(allLogs());
62+
if (/Tests complete/i.test(msg)) testIsFinished.ready(allLogs());
63+
else if (/Tests failed/i.test(msg)) testIsFinished.cancel(allLogs());
6464
});
6565

66-
const TEST_DOC = fs.readFileSync(
66+
const testDocument = fs.readFileSync(
6767
path.resolve(
6868
__dirname,
6969
'../../',
70-
testUrl,
70+
testFile,
7171
),
7272
'utf-8',
7373
);
7474

75-
it(`should pass test suite ${path.basename(testUrl)}`, async () => {
76-
new JSDOM(TEST_DOC, {
75+
it(`should pass test suite ${path.basename(testFile)}`, async () => {
76+
new JSDOM(testDocument, {
7777
/**
7878
* This does not actually run a server of any kind, it only informs the
7979
* DOM what to put in `window.location.origin`. By default, this is
@@ -94,7 +94,7 @@ describe('Runtime tests', () => {
9494
});
9595

9696
try {
97-
await TestIsFinished;
97+
await testIsFinished;
9898
} catch (e) {
9999
fail(`Failed test in suite ${testName}: \n${e}\n`);
100100
}

0 commit comments

Comments
 (0)