jan/core/src/node/api/restful/v1.test.ts
Louis 846efb3126
test: add core modules test cases (#3498)
* chore: add core module test cases

* chore: fix tests

* chore: add code coverage report

* chore: split coverage step

* chore: split coverage step

* Update jan-electron-linter-and-test.yml

* Update jan-electron-linter-and-test.yml

* Update jan-electron-linter-and-test.yml

* chore: update tests

* chore: add web utils test cases

* chore: add restful and helper tests

* chore: add tests
2024-09-06 11:14:28 +07:00

17 lines
354 B
TypeScript

import { v1Router } from './v1';
import { commonRouter } from './common';
test('should define v1Router function', () => {
expect(v1Router).toBeDefined();
});
test('should register commonRouter', () => {
const mockApp = {
register: jest.fn(),
};
v1Router(mockApp as any);
expect(mockApp.register).toHaveBeenCalledWith(commonRouter);
});