flecks/packages/server/test/build-dev.js
2024-02-14 20:16:31 -06:00

28 lines
605 B
JavaScript

import {access} from 'fs/promises';
import {join} from 'path';
import {heavySetup} from '@flecks/core/build/testing';
import {expect} from 'chai';
import {build} from './helpers/build';
import {createApplication} from './helpers/create-application';
let artifact;
before(heavySetup(async () => {
const path = await createApplication();
await build(path, {args: ['-d']});
try {
await access(join(path, 'dist', 'server', 'index.js'));
artifact = true;
}
catch (error) {
artifact = false;
}
}));
it('builds for development', async () => {
expect(artifact)
.to.be.true;
});