import * as fs from "fs" ; import * as path from "path" ; param rootPath param inclusions returns export const findBudgieTestSourcesUnder = ( rootPath ) : Map < string , string [ ] > => { const childrenNames = fs . readdirSync ( rootPath ) ; const tests = new Map < string , string [ ] > ( ) ; for ( const childName of childrenNames ) { tests . set ( childName , fs . readdirSync ( path . resolve ( rootPath , childName ) ) . filter ( ( testFileName ) => testFileName . indexOf ( ".bg" ) !== - 1 ) . map ( ( testFileName ) => testFileName . substring ( 0 , testFileName . indexOf ( ".bg" ) ) ) ) ; } return tests ; } ;