Updating tests

This commit is contained in:
Justin 2018-05-17 18:30:18 -04:00
parent 84aaa2a809
commit d36364a7bf
5 changed files with 10 additions and 9 deletions

View File

@ -60,7 +60,7 @@ export const ProjectsBundle = Bundler(Pick(APIServices, [
'ProjectHooks',
'ProjectMembers',
'ProjectMilestones',
'ProjectSnippet',
'ProjectSnippets',
'ProjectSnippetNotes',
'ProjectSnippetDiscussions',
'ProjectSnippetAwardEmojis',

View File

@ -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';

View File

@ -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]);
});
});

View File

@ -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]);
});
});

View File

@ -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]);
});
});