Skip to content
This repository has been archived by the owner on Feb 4, 2021. It is now read-only.

Commit

Permalink
style: prettier
Browse files Browse the repository at this point in the history
  • Loading branch information
williamdes committed Nov 10, 2019
1 parent 3f32878 commit 132fb6f
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 3 deletions.
5 changes: 4 additions & 1 deletion src/lib/queue.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,10 @@ const takeNextN = (first: boolean, groupName: string) => {
lock: '',
groupName: groupName,
},
order: [['priority', 'DESC'], ['added', first ? 'ASC' : 'DESC']],
order: [
['priority', 'DESC'],
['added', first ? 'ASC' : 'DESC'],
],
limit: n,
attributes: ['id'],
})
Expand Down
12 changes: 10 additions & 2 deletions test/stack.ts
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,11 @@ export default () => {

test('add to stack', done => {
const stackTest = stack();
stackTest.init(30, () => {}, () => {});
stackTest.init(
30,
() => {},
() => {}
);
expect(stackTest.getTasks()).to.deep.equal([]);
stackTest.addToStack('Test message');
expect(stackTest.getTasks()).to.deep.equal(['Test message']);
Expand Down Expand Up @@ -149,7 +153,11 @@ export default () => {

test('cron task getter', done => {
const stackTest = stack();
stackTest.init(100, () => {}, taskMessage => {});
stackTest.init(
100,
() => {},
taskMessage => {}
);
stackTest.getCronTask().start();
done();
});
Expand Down

0 comments on commit 132fb6f

Please sign in to comment.