fix: default tests

This commit is contained in:
cha0s 2024-02-10 10:54:59 -06:00
parent df983a3c46
commit 8798073a00

View File

@ -22,12 +22,12 @@ module.exports = async (env, argv, flecks) => {
config.output.chunkFormat = false;
config.output.path = join(FLECKS_CORE_ROOT, 'dist', 'test');
const testPaths = [];
if (!FLECKS_CORE_TEST_PLATFORMS) {
testPaths.push(...await glob(join(tests, '*.js')));
}
const platforms = FLECKS_CORE_TEST_PLATFORMS
? JSON.parse(FLECKS_CORE_TEST_PLATFORMS)
: flecks.platforms;
: [...new Set(['default', ...flecks.platforms])];
if (platforms.includes('default')) {
testPaths.push(...await glob(join(tests, '*.js')));
}
testPaths.push(
...(await Promise.all(platforms.map((platform) => glob(join(tests, platform, '*.js')))))
.flat(),