@@ -35,7 +35,7 @@ const TEST_FILES = glob.sync(path.resolve(
35
35
) ) ;
36
36
37
37
describe ( 'Runtime tests' , ( ) => {
38
- for ( const testUrl of TEST_FILES ) {
38
+ for ( const testFile of TEST_FILES ) {
39
39
const logs = [ ] ;
40
40
const passed = / P A S S E D / i;
41
41
const failed = / F A I L E D / i;
@@ -54,26 +54,26 @@ describe('Runtime tests', () => {
54
54
} else return msg ;
55
55
} ;
56
56
57
- const testName = path . basename ( testUrl ) ;
58
- const TestIsFinished = new FutureEvent ( ) ;
57
+ const testName = path . basename ( testFile ) ;
58
+ const testIsFinished = new FutureEvent ( ) ;
59
59
const virtualConsole = new VirtualConsole ( )
60
60
. on ( 'log' , ( msg ) => {
61
61
logs . push ( chalkMsg ( msg ) ) ;
62
- if ( / T e s t s c o m p l e t e / i. test ( msg ) ) TestIsFinished . ready ( allLogs ( ) ) ;
63
- else if ( / T e s t s f a i l e d / i. test ( msg ) ) TestIsFinished . cancel ( allLogs ( ) ) ;
62
+ if ( / T e s t s c o m p l e t e / i. test ( msg ) ) testIsFinished . ready ( allLogs ( ) ) ;
63
+ else if ( / T e s t s f a i l e d / i. test ( msg ) ) testIsFinished . cancel ( allLogs ( ) ) ;
64
64
} ) ;
65
65
66
- const TEST_DOC = fs . readFileSync (
66
+ const testDocument = fs . readFileSync (
67
67
path . resolve (
68
68
__dirname ,
69
69
'../../' ,
70
- testUrl ,
70
+ testFile ,
71
71
) ,
72
72
'utf-8' ,
73
73
) ;
74
74
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 , {
77
77
/**
78
78
* This does not actually run a server of any kind, it only informs the
79
79
* DOM what to put in `window.location.origin`. By default, this is
@@ -94,7 +94,7 @@ describe('Runtime tests', () => {
94
94
} ) ;
95
95
96
96
try {
97
- await TestIsFinished ;
97
+ await testIsFinished ;
98
98
} catch ( e ) {
99
99
fail ( `Failed test in suite ${ testName } : \n${ e } \n` ) ;
100
100
}
0 commit comments