File tree Expand file tree Collapse file tree 1 file changed +11
-2
lines changed
packages/browser-integration-tests/scripts Expand file tree Collapse file tree 1 file changed +11
-2
lines changed Original file line number Diff line number Diff line change @@ -7,15 +7,18 @@ const exec = promisify(childProcess.exec);
7
7
8
8
async function run ( ) : Promise < void > {
9
9
let testPaths = getTestPaths ( ) ;
10
+ let failed = [ ] ;
10
11
11
12
try {
12
13
const changedPaths : string [ ] = process . env . CHANGED_TEST_PATHS ? JSON . parse ( process . env . CHANGED_TEST_PATHS ) : [ ] ;
13
14
14
15
if ( changedPaths . length > 0 ) {
15
16
console . log ( `Detected changed test paths:
16
- ${ changedPaths . join ( '\n' ) } ` ) ;
17
+ ${ changedPaths . join ( '\n' ) }
17
18
18
- testPaths = testPaths . filter ( p => changedPaths . some ( changedPath => p . includes ( changedPath ) ) ) ;
19
+ ` ) ;
20
+
21
+ testPaths = testPaths . filter ( p => changedPaths . some ( changedPath => changedPath . includes ( p ) ) ) ;
19
22
}
20
23
} catch {
21
24
console . log ( 'Could not detect changed test paths, running all tests.' ) ;
@@ -36,8 +39,14 @@ ${changedPaths.join('\n')}`);
36
39
console . log ( ` ☑️ Passed ${ runCount } times, avg. duration ${ Math . ceil ( ( end - start ) / runCount ) } ms` ) ;
37
40
} catch ( error ) {
38
41
logError ( error ) ;
42
+ failed . push ( testPath ) ;
39
43
}
40
44
}
45
+
46
+ if ( failed . length > 0 ) {
47
+ console . log ( '' ) ;
48
+ console . error ( `⚠️ ${ failed . length } test(s) failed.` ) ;
49
+ }
41
50
}
42
51
43
52
function getTestPaths ( ) : string [ ] {
You can’t perform that action at this time.
0 commit comments