Files
privacy.sexy/tests/unit/shared/Stubs/PipelineCompilerStub.ts
undergroundwires 803ef2bb3e Move stubs from ./stubs to ./shared/Stubs
Gathers all shared test code in single place.
2022-01-25 08:37:03 +01:00

11 lines
425 B
TypeScript

import { IPipelineCompiler } from '@/application/Parser/Script/Compiler/Expressions/Pipes/IPipelineCompiler';
export class PipelineCompilerStub implements IPipelineCompiler {
public compileHistory: Array<{ value: string, pipeline: string }> = [];
public compile(value: string, pipeline: string): string {
this.compileHistory.push({ value, pipeline });
return `value: ${value}"\n${pipeline}: ${pipeline}`;
}
}