Skip to content

Commit

Permalink
added test for custom request body when building new requests using .…
Browse files Browse the repository at this point in the history
…with()
  • Loading branch information
poef committed Oct 11, 2024
1 parent fb9c171 commit 35a6ef4
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions test/json.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -15,3 +15,14 @@ tap.test('start', async t => {
t.equal(res.body.foo, 'bar')
t.end()
})

tap.test('start', async t => {
let c = metro.client().with(echomw()).with(jsonmw())
let res = await c.post('foo/', {
body: {
foo: 'bar'
}
})
t.equal(res.body.foo, 'bar')
t.end()
})

0 comments on commit 35a6ef4

Please sign in to comment.