import { Do, Effect } from '../stdlib/effect' import { PutStringLn } from '../stdlib/stdio' import { DefineEffect } from '../stdlib/sys' type Test = [ PutStringLn<`* ${m}`>, ...effs, ] type Equals = [Left] extends [Right] ? ([Right] extends [Left] ? true : false) : false type Not = B extends true ? false : true interface TestConfig { CompileTestFailures: false } type Assertion = TestConfig['CompileTestFailures'] extends true ? true : boolean interface Assert<_B extends Assertion> extends Effect { } export type main = [ DefineEffect<'Assert', `([b], ctx) => { if (!ctx.getTypeValue(b)) { throw new Error('AAAAAAA') } }`>, PutStringLn<"Running tests...">, Do<[ ...Test<"should do some stuff", [ Assert>, Assert>>, ]>, ...Test<"hello world", [ Assert>, ]>, ...Test<"should do some other stuff", [ Assert>, ]>, ]>, ]