Skip to content

Commit

Permalink
Merge abe0e9f into 1352bc8
Browse files Browse the repository at this point in the history
  • Loading branch information
PerterB committed Apr 14, 2020
2 parents 1352bc8 + abe0e9f commit 517d295
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/Bossbat.js
Expand Up @@ -98,7 +98,7 @@ export default class Bossbat {
// Call the QA functions, then finally the job function. We use a copy of
// the job definition to prevent pollution between scheduled runs.
const response = fn(name, { ...this.jobs[name] }, (_, definition) => (
definition.work()
definition.work(name)
));

const end = () => { lock.unlock(); };
Expand Down
3 changes: 2 additions & 1 deletion src/__tests__/Bossbat.test.js
Expand Up @@ -84,7 +84,8 @@ describe('Bossbat Integration', () => {
it('runs scheduled work', (done) => {
boss.hire('scheduled', {
every: '200 ms',
work: () => {
work: (jobName) => {
expect(jobName).toEqual('scheduled');
done();
},
});
Expand Down

0 comments on commit 517d295

Please sign in to comment.