Move stubs from ./stubs to ./shared/Stubs
Gathers all shared test code in single place.
This commit is contained in:
19
tests/unit/shared/Stubs/PipeStub.ts
Normal file
19
tests/unit/shared/Stubs/PipeStub.ts
Normal file
@@ -0,0 +1,19 @@
|
||||
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;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user