fix: test gathering

This commit is contained in:
cha0s 2022-02-26 13:07:37 -06:00
parent 850b889b9e
commit 308dd1a13d

View File

@ -17,18 +17,6 @@ debug('bootstrapped');
const config = require('../../../../core/src/bootstrap/fleck.neutrinorc');
config.use.push((neutrino) => {
// Test entrypoint.
const testPaths = glob.sync(join(FLECKS_ROOT, 'test/*.js'));
for (let i = 0; i < this.platforms.length; ++i) {
testPaths.push(...glob.sync(join(FLECKS_ROOT, `test/platforms/${this.platforms[i]}/*.js`)));
}
if (testPaths.length > 0) {
const testEntry = neutrino.config.entry('test').clear();
testPaths.forEach((path) => testEntry.add(path));
}
});
const compiler = flecks.invokeFleck(
'@flecks/fleck/compiler',
flecks.get('@flecks/fleck.compiler'),
@ -46,9 +34,12 @@ else {
}));
}
config.use.unshift((neutrino) => {
config.use.push((neutrino) => {
// Test entrypoint.
const testPaths = glob.sync(join(FLECKS_ROOT, 'test/*.js'));
for (let i = 0; i < this.platforms.length; ++i) {
testPaths.push(...glob.sync(join(FLECKS_ROOT, `test/platforms/${this.platforms[i]}/*.js`)));
}
if (testPaths.length > 0) {
const testEntry = neutrino.config.entry('test').clear();
testPaths.forEach((path) => testEntry.add(path));