license import { NamedCase , UnnamedCase , _cases } from "../cases" ; import { Configuration , defaults } from "../configuration" ; import { Context } from "../context" ; import { configure as _configure , MarblesFunction } from "../marbles" ; export * from "../configuration" ; export * from "../context" ; export * from "../expect" ; export { MarblesFunction } from "../marbles" ; export * from "./fake" ; export * from "./observe" ; declare const describe ; declare const expect ; declare const test ; export interface CasesFunction { < T extends UnnamedCase > ( name , func , cases ) : void ; < T extends NamedCase > ( name , func , cases ) : void ; } export function configure ( configuration ) { const { marbles } = _configure ( { ... defaults ( ) , assertDeepEqual : ( a , e ) => expect ( a ) . toStrictEqual ( e ) , frameworkMatcher : true , ... configuration , } ) ; function cases < T extends UnnamedCase > ( name , func , cases ) ; function cases < T extends NamedCase > ( name , func , cases ) ; function cases ( name , func , cases ) { describe ( name , ( ) => { _cases ( ( c ) => { const t = c . only ? test . only : c . skip ? test . skip : test ; if ( func . length > 2 ) { t ( c . name , marbles ( ( m , second , ... rest ) => func ( m , c , second , ... rest ) ) ) ; } else { t ( c . name , marbles ( ( m , ... rest ) => func ( m , c , ... rest ) ) ) ; } } , cases ) ; } ) ; } return { cases , marbles } ; } const { cases , marbles } = configure ( { } ) ; export { cases , marbles } ;