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

Function expectSpec

packages/platform/test/OpenApi.test.ts:148–157  ·  view source on GitHub ↗
(
  api: HttpApi.HttpApi<Id, Groups, E, R>,
  expected: OpenApi.OpenAPISpec,
  options?: Options
)

Source from the content-addressed store, hash-verified

146}
147
148const expectSpec = <Id extends string, Groups extends HttpApiGroup.HttpApiGroup.Any, E, R>(
149 api: HttpApi.HttpApi<Id, Groups, E, R>,
150 expected: OpenApi.OpenAPISpec,
151 options?: Options
152) => {
153 const spec = OpenApi.fromApi(api, options)
154 // console.log(JSON.stringify(spec.paths, null, 2))
155 // console.log(JSON.stringify(spec, null, 2))
156 deepStrictEqual(spec, expected)
157}
158
159const expectPaths = <Id extends string, Groups extends HttpApiGroup.HttpApiGroup.Any, E, R>(
160 api: HttpApi.HttpApi<Id, Groups, E, R>,

Callers 3

expectPartsFunction · 0.85
expectSpecPathsFunction · 0.85
OpenApi.test.tsFile · 0.85

Calls 1

deepStrictEqualFunction · 0.90

Tested by

no test coverage detected