@@ -2,28 +2,28 @@ open Ava
22open RescriptCore
33
44test ("Returns false for schema with NoOperation" , t => {
5- t -> Assert .is (S .unknown -> S .isAsyncParse , false , ())
5+ t -> Assert .is (S .unknown -> S .isAsync , false , ())
66})
77
88test ("Returns false for sync schema" , t => {
9- t -> Assert .is (S .string -> S .isAsyncParse , false , ())
9+ t -> Assert .is (S .string -> S .isAsync , false , ())
1010})
1111
1212test ("Returns true for async schema" , t => {
1313 let schema = S .string -> S .transform (_ => {asyncParser : i => () => Promise .resolve (i )})
1414
15- t -> Assert .is (schema -> S .isAsyncParse , true , ())
15+ t -> Assert .is (schema -> S .isAsync , true , ())
1616})
1717
1818test ("Returns true for async schema after running a serializer" , t => {
1919 let schema =
2020 S .string -> S .transform (_ => {asyncParser : i => () => Promise .resolve (i ), serializer : i => i })
2121 t -> Assert .deepEqual ("abc" -> S .serializeWith (schema ), Ok (%raw (` " abc" ` ) ), ())
22- t -> Assert .is (schema -> S .isAsyncParse , true , ())
22+ t -> Assert .is (schema -> S .isAsync , true , ())
2323})
2424
2525test ("Returns true for schema with nested async" , t => {
2626 let schema = S .tuple1 (S .string -> S .transform (_ => {asyncParser : i => () => Promise .resolve (i )}))
2727
28- t -> Assert .is (schema -> S .isAsyncParse , true , ())
28+ t -> Assert .is (schema -> S .isAsync , true , ())
2929})
0 commit comments