Skip to content

Commit

Permalink
Try to fix CI tests
Browse files Browse the repository at this point in the history
  • Loading branch information
DZakh committed Dec 22, 2024
1 parent fa6abd2 commit 506a4c6
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions __tests__/Rest_test.res
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,10 @@ asyncTest("Empty app", async t => {
})

asyncTest("Validation error on not providing body", async t => {
S.setGlobalConfig({
defaultUnknownKeys: Strict,
})

let route = Rest.route(() => {
path: "/",
method: Post,
Expand Down Expand Up @@ -96,6 +100,10 @@ asyncTest("Validation error on not providing body", async t => {
})

asyncTest("Test simple POST request", async t => {
S.setGlobalConfig({
defaultUnknownKeys: Strict,
})

let userSchema = S.object(s =>
{
"userName": s.field("user_name", S.string),
Expand Down Expand Up @@ -161,6 +169,10 @@ asyncTest("Test simple POST request", async t => {
})

asyncTest("Test mixing s.body/s.data and s.field", async t => {
S.setGlobalConfig({
defaultUnknownKeys: Strict,
})

t->ExecutionContext.plan(10)

let data = {
Expand Down Expand Up @@ -386,6 +398,10 @@ asyncTest("Integration test of simple POST request", async t => {
})

asyncTest("Test request with mixed body and header data", async t => {
S.setGlobalConfig({
defaultUnknownKeys: Strict,
})

let createGame = Rest.route(() => {
path: "/game",
method: Post,
Expand Down

0 comments on commit 506a4c6

Please sign in to comment.