@dxdeveloperexperience/hygie
Version:
Hygie is an easy-to-use Open-Source REST API allowing you to interact with GIT events. This NestJS API expose a set of customizable rules to automate your project's life cycle.
33 lines (30 loc) • 884 B
text/typescript
import { Module, HttpModule } from '@nestjs/common';
import { GitModule } from '../git/git.module';
import { RunnablesService } from '../runnables/runnables.service';
import { Runnable } from '../runnables/runnable.class';
import { RuleResult } from '../rules/ruleResult';
import { CallbackType } from '../runnables/runnables.service';
import { RunnableDecorator } from '../runnables/runnable.decorator';
('MockRunnable')
export class MockRunnable extends Runnable {
async run(
callbackType: CallbackType,
ruleResult: RuleResult,
args: any,
): Promise<void> {
return;
}
}
({
imports: [HttpModule, GitModule],
providers: [
{
provide: RunnablesService,
useFactory() {
return new RunnablesService([new MockRunnable()]);
},
},
],
exports: [RunnablesService],
})
export class MockRunnableModule {}