File tree Expand file tree Collapse file tree 1 file changed +6
-5
lines changed
packages/browser-integration-tests/scripts Expand file tree Collapse file tree 1 file changed +6
-5
lines changed Original file line number Diff line number Diff line change @@ -6,18 +6,19 @@ import { promisify } from 'util';
6
6
const exec = promisify ( childProcess . exec ) ;
7
7
8
8
async function run ( ) : Promise < void > {
9
- const testPaths = getTestPaths ( ) ;
9
+ let testPaths = getTestPaths ( ) ;
10
10
11
11
try {
12
- const changedPaths = process . env . CHANGED_TEST_PATHS ? JSON . parse ( process . env . CHANGED_TEST_PATHS ) : [ ] ;
12
+ const changedPaths : string [ ] = process . env . CHANGED_TEST_PATHS ? JSON . parse ( process . env . CHANGED_TEST_PATHS ) : [ ] ;
13
13
14
14
if ( changedPaths . length > 0 ) {
15
- console . log ( `Detected changed test paths: ${ changedPaths . join ( ', ' ) } ` ) ;
16
- // TODO FN: detect this!
15
+ console . log ( `Detected changed test paths:
16
+ ${ changedPaths . join ( '\n' ) } `) ;
17
+
18
+ testPaths = testPaths . filter ( p => changedPaths . some ( changedPath => p . includes ( changedPath ) ) ) ;
17
19
}
18
20
} catch {
19
21
console . log ( 'Could not detect changed test paths, running all tests.' ) ;
20
- // ignore, just run all
21
22
}
22
23
23
24
const cwd = path . join ( __dirname , '../' ) ;
You can’t perform that action at this time.
0 commit comments