t3-code-android-nightly/.repos/effect-smol/packages/effect/test/http/FindMyWay/methods.test.ts
Julius Marminge 6f9cea00ae
chore(refs): sync Effect and Alchemy references to 4.0.1 and beta.80 (#16170)
Co-authored-by: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-10-05 13:22:30 -07:00

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