fix(core): update

This commit is contained in:
2020-06-21 16:06:11 +00:00
parent 94b313b835
commit c08c708704
10 changed files with 219 additions and 28 deletions

View File

@ -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();