MCPcopy Create free account
hub / github.com/Effect-TS/effect / assertNormalizedUrlParams

Function assertNormalizedUrlParams

packages/platform/test/HttpApiBuilder.test.ts:6–12  ·  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

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

Callers 1

Calls 1

deepStrictEqualFunction · 0.90

Tested by

no test coverage detected