diff --git a/src/index.js b/src/index.js index d2e14c3b..ee7f12f4 100644 --- a/src/index.js +++ b/src/index.js @@ -60,7 +60,7 @@ export const ProjectsBundle = Bundler(Pick(APIServices, [ 'ProjectHooks', 'ProjectMembers', 'ProjectMilestones', - 'ProjectSnippet', + 'ProjectSnippets', 'ProjectSnippetNotes', 'ProjectSnippetDiscussions', 'ProjectSnippetAwardEmojis', diff --git a/src/services/index.js b/src/services/index.js index 89b1ba05..9f2d5812 100644 --- a/src/services/index.js +++ b/src/services/index.js @@ -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'; diff --git a/test/tests/bundles/GroupsBundle.js b/test/tests/bundles/GroupsBundle.js index 58696df5..ba1b5539 100644 --- a/test/tests/bundles/GroupsBundle.js +++ b/test/tests/bundles/GroupsBundle.js @@ -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]); }); }); diff --git a/test/tests/bundles/ProjectsBundle.js b/test/tests/bundles/ProjectsBundle.js index 92c3e8e9..b37502aa 100644 --- a/test/tests/bundles/ProjectsBundle.js +++ b/test/tests/bundles/ProjectsBundle.js @@ -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]); }); }); diff --git a/test/tests/bundles/UsersBundle.js b/test/tests/bundles/UsersBundle.js index 30758139..b6c206be 100644 --- a/test/tests/bundles/UsersBundle.js +++ b/test/tests/bundles/UsersBundle.js @@ -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]); }); });