UNPKG

471 BJavaScriptView Raw
1const { Operation } = require('../src/Operation');
2const { delay } = require('./utils');
3
4class TestOperation extends Operation {
5 async run() {
6 this.result = `my result - ${this.id}`;
7 return this.result;
8 }
9}
10
11class TimeOutOperation extends Operation {
12
13 constructor(time) {
14 super();
15 this.timer = time;
16 }
17
18 async run() {
19 return delay(this.time)
20 }
21}
22
23module.exports = {
24 TestOperation,
25 TimeOutOperation
26}
\No newline at end of file