31 lines
656 B
TypeScript
31 lines
656 B
TypeScript
import { tap, expect } from '@git.zone/tstest/tapbundle';
|
|
|
|
delete process.env.CLI_CALL;
|
|
// process.env.CLOUDLY_TESTURL = 'http://localhost:3000';
|
|
|
|
import * as coreflow from '../ts/index.js';
|
|
|
|
const shouldRunStartupTest = Boolean(process.env.CLOUDLY_URL && process.env.JUMPCODE);
|
|
|
|
if (process.env.CI) {
|
|
tap.start();
|
|
process.exit(0);
|
|
}
|
|
|
|
tap.test('should startup correctly', async () => {
|
|
if (!shouldRunStartupTest) {
|
|
return;
|
|
}
|
|
await coreflow.runCli();
|
|
});
|
|
|
|
tap.test('should end correctly', async (tools) => {
|
|
if (!shouldRunStartupTest) {
|
|
return;
|
|
}
|
|
await tools.delayFor(2000);
|
|
await coreflow.stop();
|
|
});
|
|
|
|
export default tap.start();
|