Closed cpgo closed 4 years ago
Well... I was overthinking this.
I could simply do this
const jobWithDoneCallback : JobWithDoneCallback<unknown, unknown>= {
data: firstDeployment,
done: () => ({}),
id: 'job-id',
name: 'job-name'
}
const jobResult = await deploymentHandler.run(jobWithDoneCallback)
Hello, im trying to write a test for my job handler. Idealy I tried to simply instantiate my handler and pass a payload to it but that didnt work because the parameter that pg-boss passes to it (This is what I ended up doing, see my other comment)
Since I cannot instantiate aJobWithDoneCallback
I am trying to simply call pg-boss on my tests.This is what I tried so far, but my
expect
s are not running (or are only in the context of pg-boss?)