tests/run_tests.js
// Make sure to run `npm run build` before running these tests
Make sure to run `npm run build` before running these tests
Make sure to run ` npm run build ` before running these tests
function main() {
    const dirs = process.argv.slice(2);
    glob("tests/test_*/", (err, files) => {
        if (err) {
            console.error(err);
            return;
        }
        const filteredFiles = dirs.length === 0
            ? files
            : files.filter(file => {
                for (const dir of dirs) {
                    if (file.indexOf(dir) >= 0) {
                        return true;
                    }
                }
                return false;
            });
        const passed = runTests(filteredFiles);
        if (!passed) {
            process.exit(1);
        }
    });
}
function main ( ) { const dirs = process . argv . slice ( 2 ) ; glob ( "tests/test_*/" , ( err , files ) => { if ( err ) { console . error ( err ) ; return ; } const filteredFiles = dirs . length === 0 ? files : files . filter ( file => { for ( const dir of dirs ) { if ( file . indexOf ( dir ) >= 0 ) { return true ; } } return false ; } ) ; const passed = runTests ( filteredFiles ) ; if ( ! passed ) { process . exit ( 1 ) ; } } ) ; }
Make sure to run `npm run build` before running these tests
Make sure to run ` npm run build ` before running these tests
// TODO Better filtering of "dirs"