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';
66const exec = promisify ( childProcess . exec ) ;
77
88async function run ( ) : Promise < void > {
9- const testPaths = getTestPaths ( ) ;
9+ let testPaths = getTestPaths ( ) ;
1010
1111 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 ) : [ ] ;
1313
1414 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 ) ) ) ;
1719 }
1820 } catch {
1921 console . log ( 'Could not detect changed test paths, running all tests.' ) ;
20- // ignore, just run all
2122 }
2223
2324 const cwd = path . join ( __dirname , '../' ) ;
You can’t perform that action at this time.
0 commit comments