cloudly/test/test.ts

22 lines
553 B
TypeScript
Raw Normal View History

2024-04-20 10:21:41 +00:00
import { expect, tap } from '@push.rocks/tapbundle';
import * as helpers from './helpers/index.js';
2024-04-20 10:21:41 +00:00
import * as cloudly from '../ts/index.js';
let testCloudly: cloudly.Cloudly;
tap.test('first test', async () => {
testCloudly = await helpers.createCloudly();
2024-04-20 10:21:41 +00:00
expect(testCloudly).toBeInstanceOf(cloudly.Cloudly);
});
tap.test('should init cloudly', async () => {
await testCloudly.start();
});
tap.test('should end the service', async (tools) => {
await testCloudly.stop();
tools.delayFor(1000).then(() => process.exit())
});
tap.start();