fix(core): update
This commit is contained in:
23
test/test.ts
23
test/test.ts
@ -1,8 +1,27 @@
|
||||
import { expect, tap } from '@pushrocks/tapbundle';
|
||||
import * as qenv from '@pushrocks/qenv';
|
||||
const testQenv = new qenv.Qenv('./', './.nogit');
|
||||
|
||||
import * as ora from '../ts/index';
|
||||
|
||||
tap.test('first test', async () => {
|
||||
console.log(ora.standardExport);
|
||||
let oraInstance: ora.Ora;
|
||||
|
||||
tap.test('should create a valid instance for Ora', async () => {
|
||||
oraInstance = new ora.Ora(testQenv.getEnvVarOnDemand('ORA_APITOKEN'));
|
||||
});
|
||||
|
||||
tap.test('should get all organizations', async () => {
|
||||
const organizations = await oraInstance.getOrganizations();
|
||||
expect(organizations.length).to.equal(2);
|
||||
});
|
||||
|
||||
tap.test('should get all projects of an organization', async () => {
|
||||
const organizations = await oraInstance.getOrganizations();
|
||||
const losslessOrganization = organizations.find(orgArg => {
|
||||
return orgArg.name.startsWith('Lossless');
|
||||
});
|
||||
const projectsInLosslessOrg = await losslessOrganization.getAllProjects();
|
||||
console.log(projectsInLosslessOrg);
|
||||
});
|
||||
|
||||
tap.start();
|
||||
|
Reference in New Issue
Block a user