2024-06-05 12:13:03 +00:00
|
|
|
import { tap, expect } from '@push.rocks/tapbundle';
|
|
|
|
|
|
|
|
import * as cloudlyApiClient from '../ts_apiclient/index.js';
|
|
|
|
|
|
|
|
let testClient: cloudlyApiClient.CloudlyApiClient;
|
|
|
|
|
|
|
|
tap.test('should create a new cloudlyApiClient', async () => {
|
|
|
|
testClient = new cloudlyApiClient.CloudlyApiClient({
|
|
|
|
registerAs: 'api',
|
|
|
|
cloudlyUrl: 'http://localhost:3000',
|
|
|
|
});
|
2024-08-25 12:29:26 +00:00
|
|
|
// await testClient.start();
|
2024-06-05 12:13:03 +00:00
|
|
|
expect(testClient).toBeTruthy();
|
|
|
|
});
|
|
|
|
|
2024-08-25 12:29:26 +00:00
|
|
|
tap.test('should get an identity', async () => {
|
|
|
|
const identity = await testClient.getIdentityByJumpCode('test');
|
|
|
|
expect(identity).toBeTruthy();
|
|
|
|
});
|
|
|
|
|
2024-06-05 12:13:03 +00:00
|
|
|
tap.test('should trigger a server action', async () => {
|
|
|
|
|
|
|
|
})
|
|
|
|
|
2024-08-25 12:29:26 +00:00
|
|
|
tap.test('should stop the apiclient', async (toolsArg) => {
|
|
|
|
await toolsArg.delayFor(1000);
|
2024-06-05 12:13:03 +00:00
|
|
|
await testClient.stop();
|
|
|
|
})
|
|
|
|
|
|
|
|
export default tap.start();
|