fix(core): update

This commit is contained in:
2021-05-16 23:50:56 +00:00
parent 0ba352e90a
commit 7765ff77f9
11 changed files with 413 additions and 140 deletions

View File

@ -1,4 +1,4 @@
import { expect, tap } from '@pushrocks/tapbundle'
import { expect, tap } from '@pushrocks/tapbundle';
import * as gitlab from '../ts/index';
let testGitlabAccount: gitlab.GitlabAccount;
@ -20,4 +20,16 @@ tap.test('should get the pushrocks group', async () => {
await pushrocksGroup.getProjects();
});
tap.test('should get the readme of a project', async () => {
const pushrocksGroup = await testGitlabAccount.getGroupByName('pushrocks');
expect(pushrocksGroup).to.be.instanceOf(gitlab.GitlabGroup);
const projects = await pushrocksGroup.getProjects();
const selectedProject = projects.find((project) => {
return project.data?.name === 'smartfile';
});
expect(selectedProject.data.name).to.equal('smartfile');
const readme = await selectedProject.getReadmeAsMarkdown('master');
expect(readme).to.startWith('# @pushrocks/smartfile');
});
tap.start();