test: mock bull
This commit is contained in:
parent
8bddc1b338
commit
ac349b40f5
|
@ -0,0 +1,18 @@
|
|||
// @flow
|
||||
export default class Queue {
|
||||
name: string;
|
||||
|
||||
constructor(name) {
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
process = (fn) => {
|
||||
console.log(`Registered function ${this.name}`);
|
||||
this.processFn = fn;
|
||||
};
|
||||
|
||||
add = (data) => {
|
||||
console.log(`Running ${this.name}`);
|
||||
return this.processFn({ data });
|
||||
};
|
||||
}
|
Reference in New Issue