gitbeaker/packages/core/test/unit/resources/ApplicationStatistics.ts
2025-09-02 10:36:45 -04:00

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