import test from 'ava' ; import type { Predicate , Refinement } from './main' ; test ( 'Predicate is a function that receives a value and returns boolean' , ( context ) => { type Assert < T , T2 > = T2 extends T ? true : false ; const V1 = true ; const V2 = true ; context . true ( V1 ) ; context . true ( V2 ) ; } ) ; test ( 'Refinement is a Predicate that uses `is` type guard' , ( context ) => { type Assert < T , T2 > = T2 extends T ? true : false ; const V1 = true ; const V2 = true ; const V3 = false ; context . true ( V1 ) ; context . true ( V2 ) ; context . false ( V3 ) ; } ) ;