currently, testType.* can be used in test directly. e.g.:
it('blah', () => {
testType.equal<A, B>(true)
}
However, when the tests get complicates or when there are may duplication, you would like to extract part of the test and reuse it:
it('blah', () => {
testMyType(...)
}
it('bruh', () => {
testMyType(...)
}
testMyType(...) {
testType....
}
Since testType.* are 💥 immediate, they can't be used this way.
Not sure if there is a way to achieve this a the library level as this is crossing the type-value boundary (i.e. fail type throws Error)
currently,
testType.*can be used in test directly. e.g.:However, when the tests get complicates or when there are may duplication, you would like to extract part of the test and reuse it:
Since
testType.*are 💥immediate, they can't be used this way.Not sure if there is a way to achieve this a the library level as this is crossing the type-value boundary (i.e. fail type throws
Error)