mirror of
https://github.com/gethomepage/homepage.git
synced 2026-02-08 08:50:52 +08:00
test: move pages tests out of Next.js routes
This commit is contained in:
16
src/__tests__/pages/api/healthcheck.test.js
Normal file
16
src/__tests__/pages/api/healthcheck.test.js
Normal file
@@ -0,0 +1,16 @@
|
||||
import { describe, expect, it } from "vitest";
|
||||
|
||||
import createMockRes from "test-utils/create-mock-res";
|
||||
|
||||
import handler from "pages/api/healthcheck";
|
||||
|
||||
describe("pages/api/healthcheck", () => {
|
||||
it("returns 'up'", () => {
|
||||
const req = {};
|
||||
const res = createMockRes();
|
||||
|
||||
handler(req, res);
|
||||
|
||||
expect(res.body).toBe("up");
|
||||
});
|
||||
});
|
||||
Reference in New Issue
Block a user