25 lines
749 B
TypeScript
25 lines
749 B
TypeScript
// Tests for basic/login.ts
|
|
// These tests verify the route structure and export
|
|
|
|
import assert from "node:assert/strict";
|
|
import { describe, it } from "node:test";
|
|
import { loginRoute } from "./login";
|
|
|
|
describe("basic/login", () => {
|
|
describe("loginRoute", () => {
|
|
it("has correct path", () => {
|
|
assert.equal(loginRoute.path, "/login");
|
|
});
|
|
|
|
it("handles GET and POST methods", () => {
|
|
assert.ok(loginRoute.methods.includes("GET"));
|
|
assert.ok(loginRoute.methods.includes("POST"));
|
|
assert.equal(loginRoute.methods.length, 2);
|
|
});
|
|
|
|
it("has a handler function", () => {
|
|
assert.equal(typeof loginRoute.handler, "function");
|
|
});
|
|
});
|
|
});
|