asyncTest("Test string data response", async t => {
let route = Rest.route(() => {
path: "/test",
method: Post,
input: _ => (),
responses: [s => s.data(S.string)],
})
try {
let app = Fastify.make()
app->Fastify.route(route, async _ => "foo")
let client = Rest.client(~baseUrl="http://localhost:3000", ~fetcher=args => app->inject(args))
t->Assert.deepEqual(await client.call(route, ()), "foo")
} catch {
| _ => {
Js.log(%raw(`exn`))
Js.Exn.raiseError("foo")
}
}
})