import 'mocha' ; import { expect } from 'chai' ; import { IPipe } from '@/application/Parser/Script/Compiler/Expressions/Pipes/IPipe' ; export interface IPipeTestCase { readonly name : string ; readonly input : string ; readonly expectedOutput : string ; } export function runPipeTests ( sut , testCases ) { for ( const testCase of testCases ) { it ( testCase . name , ( ) => { const actual = sut . apply ( testCase . input ) ; expect ( actual ) . to . equal ( testCase . expectedOutput ) ; } ) ; } }