2024-02-05 17:08:26 -06:00
|
|
|
import {access} from 'fs/promises';
|
|
|
|
import {join} from 'path';
|
|
|
|
|
2024-02-10 14:17:12 -06:00
|
|
|
import {heavySetup} from '@flecks/core/build/testing';
|
2024-02-05 17:08:26 -06:00
|
|
|
import {expect} from 'chai';
|
|
|
|
|
2024-02-14 20:16:31 -06:00
|
|
|
import {build} from './helpers/build';
|
|
|
|
import {createApplication} from './helpers/create-application';
|
2024-02-05 17:08:26 -06:00
|
|
|
|
2024-02-10 14:17:12 -06:00
|
|
|
let artifact;
|
|
|
|
|
|
|
|
before(heavySetup(async () => {
|
2024-02-07 10:15:07 -06:00
|
|
|
const path = await createApplication();
|
2024-02-05 17:08:26 -06:00
|
|
|
await build(path, {args: ['-d']});
|
|
|
|
try {
|
|
|
|
await access(join(path, 'dist', 'server', 'index.js'));
|
|
|
|
artifact = true;
|
|
|
|
}
|
|
|
|
catch (error) {
|
|
|
|
artifact = false;
|
|
|
|
}
|
2024-02-10 14:17:12 -06:00
|
|
|
}));
|
|
|
|
|
|
|
|
it('builds for development', async () => {
|
2024-02-05 17:08:26 -06:00
|
|
|
expect(artifact)
|
|
|
|
.to.be.true;
|
|
|
|
});
|