mirror of
https://github.com/jdalrymple/gitbeaker.git
synced 2026-01-18 15:55:30 +00:00
25 lines
790 B
TypeScript
25 lines
790 B
TypeScript
import { UsersBundle } from '../../../src';
|
|
import * as Services from '../../../src/services';
|
|
|
|
test('All the correct service keys are included in the users bundle', async () => {
|
|
const bundle: UsersBundle = new UsersBundle({ requesterFn: jest.fn(), token: 'test' });
|
|
const services = [
|
|
'Users',
|
|
'UserEmails',
|
|
'UserCustomAttributes',
|
|
'UserImpersonationTokens',
|
|
'UserKeys',
|
|
'UserGPGKeys',
|
|
];
|
|
|
|
expect(Object.keys(bundle)).toIncludeAllMembers(services);
|
|
});
|
|
|
|
test('All the correct service instances are included in the users bundle', async () => {
|
|
const bundle = new UsersBundle({ requesterFn: jest.fn(), token: 'test' });
|
|
|
|
(Object.keys(bundle) as (keyof typeof bundle)[]).forEach((key) => {
|
|
expect(bundle[key]).toBeInstanceOf(Services[key]);
|
|
});
|
|
});
|