mirror of
https://github.com/VibedByKaKi/t3-code-android-nightly.git
synced 2026-10-31 17:14:39 +01:00
16 lines
481 B
TypeScript
16 lines
481 B
TypeScript
import { assert, it } from "@effect/vitest"
|
|
import { FindMyWay as Router } from "effect/http"
|
|
|
|
it("returns undefined for method names inherited from Object.prototype", () => {
|
|
const router = Router.make<boolean>()
|
|
router.on("GET", "/", true)
|
|
|
|
assert.isUndefined(router.find("constructor", "/"))
|
|
})
|
|
|
|
it("registers QUERY with all", () => {
|
|
const router = Router.make<boolean>()
|
|
router.all("/all", true)
|
|
|
|
assert.strictEqual(router.find("QUERY", "/all")?.handler, true)
|
|
})
|