fix(core): update
This commit is contained in:
14
test/test.ts
14
test/test.ts
@ -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();
|
||||
|
Reference in New Issue
Block a user