11import { describe , expect } from "vitest" ;
2- import { test as it , test , fc } from "@fast-check/vitest" ;
2+ import { test , fc } from "@fast-check/vitest" ;
33import {
44 ConditionalExpression ,
55 BooleanExpression ,
@@ -257,52 +257,52 @@ describe("evaluate", () => {
257257 orFalseExpressions ,
258258 ) ;
259259
260- it . prop ( [ trueExpressions ] ) ( "should evaluate expressions" , ( expression ) => {
260+ test . prop ( [ trueExpressions ] ) ( "should evaluate expressions" , ( expression ) => {
261261 expect ( evaluate ( expression ) ) . toBe ( true ) ;
262262 } ) ;
263263
264- it . prop ( [ falseExpressions ] ) ( "should evaluate false expressions" , ( expression ) => {
264+ test . prop ( [ falseExpressions ] ) ( "should evaluate false expressions" , ( expression ) => {
265265 expect ( evaluate ( expression ) ) . toBe ( false ) ;
266266 } ) ;
267267
268- it ( "should deep compare equality while attempting to convert types" , ( ) => {
268+ test ( "should deep compare equality while attempting to convert types" , ( ) => {
269269 expect ( evaluate ( [ BinaryOperator . equal , { a : "" } , { a : false } ] ) ) . toStrictEqual ( true ) ;
270270 } ) ;
271271
272- it ( "should strictly deep compare equality" , ( ) => {
272+ test ( "should strictly deep compare equality" , ( ) => {
273273 expect ( evaluate ( [ BinaryOperator . exactlyMatches , { a : "" } , { a : false } ] ) ) . toStrictEqual (
274274 false ,
275275 ) ;
276276 } ) ;
277277
278- it ( "should deep compare inequality while attempting to convert types" , ( ) => {
278+ test ( "should deep compare inequality while attempting to convert types" , ( ) => {
279279 expect ( evaluate ( [ BinaryOperator . notEqual , { a : "" } , { a : false } ] ) ) . toStrictEqual ( false ) ;
280280 } ) ;
281281
282- it ( "should strictly deep compare inequality" , ( ) => {
282+ test ( "should strictly deep compare inequality" , ( ) => {
283283 expect ( evaluate ( [ BinaryOperator . doesNotExactlyMatch , { a : "" } , { a : false } ] ) ) . toStrictEqual (
284284 true ,
285285 ) ;
286286 } ) ;
287287 } ) ;
288288
289- it ( "evaluate BinaryOperator.in with array of numbers and value that is a number" , ( ) => {
289+ test ( "evaluate BinaryOperator.in with array of numbers and value that is a number" , ( ) => {
290290 expect ( evaluate ( [ BinaryOperator . in , 2 , [ 1 , 2 , 3 ] ] ) ) . toStrictEqual ( true ) ;
291291 } ) ;
292292
293- it ( "evaluate BinaryOperator.in with array of numbers and value that is a stringified number" , ( ) => {
293+ test ( "evaluate BinaryOperator.in with array of numbers and value that is a stringified number" , ( ) => {
294294 expect ( evaluate ( [ BinaryOperator . in , "2" , [ 1 , 2 , 3 ] ] ) ) . toStrictEqual ( true ) ;
295295 } ) ;
296296
297- it ( "evaluate BinaryOperator.in with array of stringified numbers and value that is a stringified number" , ( ) => {
297+ test ( "evaluate BinaryOperator.in with array of stringified numbers and value that is a stringified number" , ( ) => {
298298 expect ( evaluate ( [ BinaryOperator . in , "2" , [ "1" , "2" , "3" ] ] ) ) . toStrictEqual ( true ) ;
299299 } ) ;
300300
301- it ( "evaluate BinaryOperator.in with array of numbers including zero and value that is a stringified false" , ( ) => {
301+ test ( "evaluate BinaryOperator.in with array of numbers including zero and value that is a stringified false" , ( ) => {
302302 expect ( evaluate ( [ BinaryOperator . in , "false" , [ 0 , 1 , 2 ] ] ) ) . toStrictEqual ( false ) ;
303303 } ) ;
304304
305- it ( "evaluate BinaryOperator.in with array of numbers including zero and value that is a false" , ( ) => {
305+ test ( "evaluate BinaryOperator.in with array of numbers including zero and value that is a false" , ( ) => {
306306 expect ( evaluate ( [ BinaryOperator . in , false , [ 0 , 1 , 2 ] ] ) ) . toStrictEqual ( false ) ;
307307 } ) ;
308308
@@ -316,11 +316,11 @@ describe("evaluate", () => {
316316 fc . string ( ) ,
317317 ) ;
318318
319- it . prop ( [ invalidExpressions ] ) ( "should throw error on invalid expression" , ( expression ) => {
319+ test . prop ( [ invalidExpressions ] ) ( "should throw error on invalid expression" , ( expression ) => {
320320 expect ( ( ) => evaluate ( expression as any ) ) . toThrow ( ) ;
321321 } ) ;
322322
323- it ( "Expect isEmpty to Validate correctly" , ( ) => {
323+ test ( "Expect isEmpty to Validate correctly" , ( ) => {
324324 expect ( evaluate ( [ UnaryOperator . isEmpty , [ ] ] ) ) . toStrictEqual ( true ) ;
325325 expect ( evaluate ( [ UnaryOperator . isEmpty , "" ] ) ) . toStrictEqual ( true ) ;
326326 expect ( evaluate ( [ UnaryOperator . isEmpty , "abc" ] ) ) . toStrictEqual ( false ) ;
@@ -329,34 +329,34 @@ describe("evaluate", () => {
329329 } ) ;
330330
331331 describe ( "test contains" , ( ) => {
332- it ( "test string contains with two strings" , ( ) => {
332+ test ( "test string contains with two strings" , ( ) => {
333333 expect ( contains ( "foo" , "oo" ) ) . toStrictEqual ( true ) ;
334334 } ) ;
335- it ( "test string contains with a numeric string and a number" , ( ) => {
335+ test ( "test string contains with a numeric string and a number" , ( ) => {
336336 expect ( contains ( "123" , 2 ) ) . toStrictEqual ( true ) ;
337337 } ) ;
338- it ( "test string contains with a non-numeric string a number" , ( ) => {
338+ test ( "test string contains with a non-numeric string a number" , ( ) => {
339339 expect ( contains ( "foo" , 2 ) ) . toStrictEqual ( false ) ;
340340 } ) ;
341- it ( "test array contains when item in array" , ( ) => {
341+ test ( "test array contains when item in array" , ( ) => {
342342 expect ( contains ( [ 1 , 2 , 3 ] , 2 ) ) . toStrictEqual ( true ) ;
343343 } ) ;
344- it ( "test array contains when subarray in array" , ( ) => {
344+ test ( "test array contains when subarray in array" , ( ) => {
345345 expect ( contains ( [ 1 , 2 , 3 , [ 4 , 5 ] ] , [ 4 , 5 ] ) ) . toStrictEqual ( false ) ;
346346 } ) ;
347- it ( "test array contains when item not in array" , ( ) => {
347+ test ( "test array contains when item not in array" , ( ) => {
348348 expect ( contains ( [ 1 , 2 , 3 ] , 9 ) ) . toStrictEqual ( false ) ;
349349 } ) ;
350- it ( "test 'array' contains when item in 'set'" , ( ) => {
350+ test ( "test 'array' contains when item in 'set'" , ( ) => {
351351 expect ( contains ( [ { foo : null , bar : null } ] , { foo : null , bar : null } ) ) . toStrictEqual ( false ) ;
352352 } ) ;
353- it ( "test 'set' contains when item in 'set'" , ( ) => {
353+ test ( "test 'set' contains when item in 'set'" , ( ) => {
354354 expect ( contains ( { foo : null , bar : null } , "bar" ) ) . toStrictEqual ( true ) ;
355355 } ) ;
356- it ( "test 'set' contains when item not in 'set'" , ( ) => {
356+ test ( "test 'set' contains when item not in 'set'" , ( ) => {
357357 expect ( contains ( { foo : null , bar : null } , "baz" ) ) . toStrictEqual ( false ) ;
358358 } ) ;
359- it ( "test 'set' contains subset" , ( ) => {
359+ test ( "test 'set' contains subset" , ( ) => {
360360 expect ( contains ( { key : { foo : null , bar : null } } , { foo : null , bar : null } ) ) . toStrictEqual (
361361 false ,
362362 ) ;
0 commit comments