mirror of
https://github.com/jdalrymple/gitbeaker.git
synced 2026-01-18 15:55:30 +00:00
25 lines
653 B
TypeScript
25 lines
653 B
TypeScript
import { RequestHelper } from '../../../src/infrastructure';
|
|
import { ApplicationStatistics } from '../../../src';
|
|
|
|
jest.mock(
|
|
'../../../src/infrastructure/RequestHelper',
|
|
() => jest.requireActual('../../__mocks__/RequestHelper').default,
|
|
);
|
|
|
|
let service: ApplicationStatistics;
|
|
|
|
beforeEach(() => {
|
|
service = new ApplicationStatistics({
|
|
requesterFn: jest.fn(),
|
|
token: 'abcdefg',
|
|
});
|
|
});
|
|
|
|
describe('ApplicationStatistics.show', () => {
|
|
it('should request GET /application/statistics', async () => {
|
|
await service.show();
|
|
|
|
expect(RequestHelper.get()).toHaveBeenCalledWith(service, 'application/statistics', undefined);
|
|
});
|
|
});
|