fix(core): update
This commit is contained in:
28
test/test.ts
Normal file
28
test/test.ts
Normal file
@@ -0,0 +1,28 @@
|
||||
import { expect, expectAsync, tap } from '@push.rocks/tapbundle';
|
||||
import * as qenv from '@push.rocks/qenv';
|
||||
const testQenv = new qenv.Qenv('./', './.nogit/');
|
||||
|
||||
import * as zitadel from '../ts/index.js'
|
||||
import test from 'node:test';
|
||||
|
||||
|
||||
let testZitadel: zitadel.ZitaldelClient;
|
||||
|
||||
tap.test('first test', async () => {
|
||||
testZitadel = new zitadel.ZitaldelClient({
|
||||
url: await testQenv.getEnvVarOnDemand('ZITADEL_URL'),
|
||||
accessToken: await testQenv.getEnvVarOnDemand('ZITADEL_TOKEN')
|
||||
});
|
||||
});
|
||||
|
||||
tap.test('should list own user', async () => {
|
||||
await testZitadel.listOwnUser();
|
||||
})
|
||||
|
||||
tap.test('should list users', async () => {
|
||||
const users = await testZitadel.listUsers();
|
||||
expect(users).toBeArray();
|
||||
expect(users[0]).toBeInstanceOf(zitadel.ZitaldelUser);
|
||||
})
|
||||
|
||||
tap.start()
|
Reference in New Issue
Block a user