@@ -34,7 +34,7 @@ const TEST_FILES = glob.sync(path.resolve(
34
34
) ) ;
35
35
36
36
describe ( 'Runtime tests' , ( ) => {
37
- for ( const TEST_URL of TEST_FILES ) {
37
+ for ( let testUrl of TEST_FILES ) {
38
38
const logs = [ ] ;
39
39
const passed = / P A S S E D / i;
40
40
const failed = / F A I L E D / i;
@@ -54,7 +54,7 @@ describe('Runtime tests', () => {
54
54
else return msg ;
55
55
}
56
56
57
- const TEST_NAME = path . basename ( TEST_URL ) ;
57
+ const testName = path . basename ( testUrl ) ;
58
58
const TestIsFinished = new FutureEvent ( ) ;
59
59
const virtualConsole = new VirtualConsole ( )
60
60
. on ( 'log' , ( msg ) => {
@@ -67,12 +67,12 @@ describe('Runtime tests', () => {
67
67
path . resolve (
68
68
__dirname ,
69
69
'../../' ,
70
- TEST_URL
70
+ testUrl
71
71
) ,
72
72
'utf-8'
73
73
) ;
74
74
75
- it ( `should pass test suite ${ path . basename ( TEST_URL ) } ` , async ( ) => {
75
+ it ( `should pass test suite ${ path . basename ( testUrl ) } ` , async ( ) => {
76
76
const { window } = new JSDOM ( TEST_DOC , {
77
77
url : 'https://localhost:42' ,
78
78
runScripts : 'dangerously' ,
@@ -82,9 +82,9 @@ describe('Runtime tests', () => {
82
82
try {
83
83
await TestIsFinished ;
84
84
} catch ( e ) {
85
- fail ( `Failed test in suite ${ TEST_NAME } : \n${ chalk . red ( e ) } \n` ) ;
85
+ fail ( `Failed test in suite ${ testName } : \n${ chalk . red ( e ) } \n` ) ;
86
86
}
87
- console . log ( `Passed all tests in suite ${ TEST_NAME } ` ) ;
87
+ console . log ( `Passed all tests in suite ${ testName } ` ) ;
88
88
} ) ;
89
89
}
90
90
} ) ;
0 commit comments