2024-04-20 10:21:41 +00:00
|
|
|
import { expect, tap } from '@push.rocks/tapbundle';
|
2024-08-25 12:29:26 +00:00
|
|
|
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 () => {
|
2024-08-25 12:29:26 +00:00
|
|
|
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) => {
|
2024-11-06 02:56:46 +00:00
|
|
|
await tools.delayFor(5000);
|
|
|
|
await helpers.stopCloudly();
|
2024-04-20 10:21:41 +00:00
|
|
|
await testCloudly.stop();
|
2024-11-06 02:56:46 +00:00
|
|
|
tools.delayFor(1000).then(() => process.exit());
|
2024-04-20 10:21:41 +00:00
|
|
|
});
|
|
|
|
|
|
|
|
tap.start();
|