MCPcopy
hub / github.com/Effect-TS/effect / assertNormalizedUrlParams

Function assertNormalizedUrlParams

packages/platform/test/HttpApiBuilder.test.ts:7–13  ·  view source on GitHub ↗
(
  schema: UrlParams & HttpApiEndpoint.HttpApiEndpoint.ValidateUrlParams<UrlParams>,
  params: Record<string, string | Array<string>>,
  expected: Record<string, string | Array<string>>
)

Source from the content-addressed store, hash-verified

5import { identity, Schema } from "effect"
6
7const assertNormalizedUrlParams = <UrlParams extends Schema.Schema.Any>(
8 schema: UrlParams & HttpApiEndpoint.HttpApiEndpoint.ValidateUrlParams<UrlParams>,
9 params: Record<string, string | Array<string>>,
10 expected: Record<string, string | Array<string>>
11) => {
12 deepStrictEqual(HttpApiBuilder.normalizeUrlParams(params, schema.ast), expected)
13}
14
15describe("HttpApiBuilder", () => {
16 describe("normalizeUrlParams", () => {

Callers 1

Calls 1

deepStrictEqualFunction · 0.90

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…