fix: tests

This commit is contained in:
cha0s 2022-03-27 01:28:06 -05:00
parent 7feac4a87b
commit a98222495e
2 changed files with 10 additions and 2 deletions

View File

@ -268,12 +268,20 @@ export default class ServerFlecks extends Flecks {
// - The fleck being compiled's build directory
// - The root build directory
// - Finally, the built-in babel config
let builtInPath;
try {
builtInPath = this.resolvePath(resolver, '@flecks/core/server');
}
catch (error) {
// This file won't be resolved during testing.
builtInPath = join(__dirname, '..', 'src', 'server');
}
const configFile = this.resolveBuildConfig(
resolver,
[
resolved,
FLECKS_CORE_ROOT,
this.resolvePath(resolver, '@flecks/core/server'),
builtInPath,
],
[
'babel.config.js',

View File

@ -1,7 +1,7 @@
import {expect} from 'chai';
// eslint-disable-next-line import/no-unresolved, import/no-extraneous-dependencies
import {Flecks} from '@flecks/core/server';
import {Flecks} from '../../../src/server';
it('bootstraps FLECKS_CORE_ROOT by default', () => {
const flecks = Flecks.bootstrap();