Files
privacy.sexy/tests/unit/shared/Stubs/PipeStub.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

20 lines
422 B
TypeScript

import { IPipe } from '@/application/Parser/Script/Compiler/Expressions/Pipes/IPipe';
export class PipeStub implements IPipe {
public name = 'pipeStub';
public apply(raw: string): string {
return raw;
}
public withName(name: string): PipeStub {
this.name = name;
return this;
}
public withApplier(applier: (input: string) => string): PipeStub {
this.apply = applier;
return this;
}
}