mirror of
https://github.com/jdalrymple/gitbeaker.git
synced 2026-01-18 15:55:30 +00:00
Updating tests
This commit is contained in:
parent
84aaa2a809
commit
d36364a7bf
@ -60,7 +60,7 @@ export const ProjectsBundle = Bundler(Pick(APIServices, [
|
||||
'ProjectHooks',
|
||||
'ProjectMembers',
|
||||
'ProjectMilestones',
|
||||
'ProjectSnippet',
|
||||
'ProjectSnippets',
|
||||
'ProjectSnippetNotes',
|
||||
'ProjectSnippetDiscussions',
|
||||
'ProjectSnippetAwardEmojis',
|
||||
|
||||
@ -41,6 +41,7 @@ export PipelineSchedules from './PipelineSchedules';
|
||||
export PipelineScheduleVariables from './PipelineScheduleVariables';
|
||||
export Projects from './Projects';
|
||||
export ProjectAccessRequests from './ProjectAccessRequests';
|
||||
export ProjectBadges from './ProjectBadges';
|
||||
export ProjectCustomAttributes from './ProjectCustomAttributes';
|
||||
export ProjectImportExport from './ProjectImportExport';
|
||||
export ProjectIssueBoards from './ProjectIssueBoards';
|
||||
|
||||
@ -19,13 +19,13 @@ test('All the correct service keys are included in the groups bundle', async ()
|
||||
'EpicDiscussions',
|
||||
];
|
||||
|
||||
expect(bundle).toHaveProperty(services);
|
||||
expect(Object.keys(bundle)).toEqual(expect.arrayContaining(services));
|
||||
});
|
||||
|
||||
test('All the correct service instances are included in the groups bundle', async () => {
|
||||
const bundle = new GroupsBundle({ token: 'test' });
|
||||
|
||||
Object.keys(bundle).forEach((key) => {
|
||||
expect(bundle[key]).instanceOf(Services[key]);
|
||||
expect(bundle[key]).toBeInstanceOf(Services[key]);
|
||||
});
|
||||
});
|
||||
|
||||
@ -30,7 +30,7 @@ test('All the correct service keys are included in the projects bundle', async (
|
||||
'ProjectHooks',
|
||||
'ProjectMembers',
|
||||
'ProjectMilestones',
|
||||
'ProjectSnippet',
|
||||
'ProjectSnippets',
|
||||
'ProjectSnippetNotes',
|
||||
'ProjectSnippetDiscussions',
|
||||
'ProjectSnippetAwardEmojis',
|
||||
@ -44,14 +44,14 @@ test('All the correct service keys are included in the projects bundle', async (
|
||||
'Triggers',
|
||||
];
|
||||
|
||||
expect(bundle).toHaveProperty(services);
|
||||
expect(Object.keys(bundle)).toEqual(expect.arrayContaining(services));
|
||||
});
|
||||
|
||||
test('All the correct service instances are included in the projects bundle', async () => {
|
||||
const bundle = new ProjectsBundle({ token: 'test' });
|
||||
|
||||
Object.keys(bundle).forEach((key) => {
|
||||
expect(bundle[key]).instanceOf(Services[key]);
|
||||
expect(bundle[key]).toBeInstanceOf(Services[key]);
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
@ -3,15 +3,15 @@ import * as Services from '../../../src/services';
|
||||
|
||||
test('All the correct service keys are included in the users bundle', async () => {
|
||||
const bundle = new UsersBundle({ token: 'test' });
|
||||
const services = ['Users', 'UserEmails', 'UserImpersonationTokens', 'UserKeys', 'UserGPGKeys'];
|
||||
const services = ['Users', 'UserEmails', 'UserCustomAttributes', 'UserImpersonationTokens', 'UserKeys', 'UserGPGKeys'];
|
||||
|
||||
expect(bundle).toHaveProperty(services);
|
||||
expect(Object.keys(bundle)).toEqual(expect.arrayContaining(services));
|
||||
});
|
||||
|
||||
test('All the correct service instances are included in the users bundle', async () => {
|
||||
const bundle = new UsersBundle({ token: 'test' });
|
||||
|
||||
Object.keys(bundle).forEach((key) => {
|
||||
expect(bundle[key]).instanceOf(Services[key]);
|
||||
expect(bundle[key]).toBeInstanceOf(Services[key]);
|
||||
});
|
||||
});
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user