Skip to content

Commit

Permalink
Merge 519d60a into d2903ae
Browse files Browse the repository at this point in the history
  • Loading branch information
Ilya Suzdalnitski committed Oct 18, 2020
2 parents d2903ae + 519d60a commit 96bc163
Show file tree
Hide file tree
Showing 4 changed files with 150 additions and 115 deletions.
10 changes: 9 additions & 1 deletion __tests__/expect_test.ml
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
open Jest

type test_record = {
value: string
}

let () =

describe "Expect" (fun () ->
Expand All @@ -23,6 +27,8 @@ describe "Expect" (fun () ->
expect [| "a"; "b"; "c" |] |> toBeSupersetOf [| "a"; "c" |]);
test "toContain" (fun () ->
expect [| "a"; "b"; "c" |] |> toContain "b");
test "toContainEqual" (fun () ->
expect [| {value = "a"}; {value = "b"}; {value = "c"} |] |> toContainEqual {value = "b"});
test "toContainString" (fun () ->
expect "banana" |> toContainString "nana");
test "toHaveLength" (fun () ->
Expand Down Expand Up @@ -69,6 +75,8 @@ describe "Expect" (fun () ->
expect [| "a"; "b"; "c" |] |> not_ |> toBeSupersetOf [| "a"; "d" |]);
test "not toContain" (fun () ->
expect [| "a"; "b"; "c" |] |> not_ |> toContain "d");
test "not toContainEqual" (fun () ->
expect [| {value = "a"}; {value = "b"}; {value = "c"} |] |> not_ |> toContainEqual {value = "d"});
test "not toContainString" (fun () ->
expect "banana" |> not_ |> toContainString "nanan");
test "not toHaveLength" (fun () ->
Expand Down Expand Up @@ -146,4 +154,4 @@ describe "ExpectJs" (fun () ->
expect [%obj { foo = 0; bar = true }] |> not_ |> toContainProperties [| "foo"; "zoo" |]);
test "not toMatchObject" (fun () ->
expect [%obj { a = 1; b = 2; c = 3 }] |> not_ |> toMatchObject [%obj { a = 1; c = 2 }]);
);
);

0 comments on commit 96bc163

Please sign in to comment.