gitlab/test/test.ts

24 lines
835 B
TypeScript
Raw Normal View History

2021-05-16 12:16:35 +00:00
import { expect, tap } from '@pushrocks/tapbundle'
import * as gitlab from '../ts/index';
2017-06-10 13:51:27 +00:00
2021-05-16 12:16:35 +00:00
let testGitlabAccount: gitlab.GitlabAccount;
2017-06-10 13:51:27 +00:00
2021-05-16 12:16:35 +00:00
tap.test('should create an anonymous Gitlab Account', async () => {
testGitlabAccount = gitlab.GitlabAccount.createAnonymousAccount();
expect(testGitlabAccount).to.be.instanceOf(gitlab.GitlabAccount);
});
tap.test('should get the pushrocks group', async () => {
const pushrocksGroup = await testGitlabAccount.getGroupByName('pushrocks');
expect(pushrocksGroup).to.be.instanceOf(gitlab.GitlabGroup);
console.log(pushrocksGroup);
});
tap.test('should get the pushrocks group', async () => {
const pushrocksGroup = await testGitlabAccount.getGroupByName('pushrocks');
expect(pushrocksGroup).to.be.instanceOf(gitlab.GitlabGroup);
await pushrocksGroup.getProjects();
});
tap.start();