Skip to content

Commit

Permalink
chore: prettier
Browse files Browse the repository at this point in the history
  • Loading branch information
stipsan committed Sep 29, 2023
1 parent 72c62c5 commit c77d31b
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 10 deletions.
6 changes: 3 additions & 3 deletions src/pipeline.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,10 @@ class Pipeline {
this.copyCommands()

Object.defineProperty(this, 'length', {
get () {
return this.batch.length;
get() {
return this.batch.length
},
});
})
}

copyCommands() {
Expand Down
4 changes: 2 additions & 2 deletions test/integration/commands/rpoplpush.js
Original file line number Diff line number Diff line change
Expand Up @@ -112,8 +112,8 @@ runTwinSuite('rpoplpush', (command, equals) => {
},
})

const result = await redis[command]('foo', 'foo', 'LEFT', 'RIGHT');
expect(result).toBe('2');
const result = await redis[command]('foo', 'foo', 'LEFT', 'RIGHT')
expect(result).toBe('2')

const list = await redis.lrange('foo', 0, -1)
expect(list).toEqual(['2', '1'])
Expand Down
8 changes: 3 additions & 5 deletions test/integration/multi.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,15 +15,13 @@ describe('multi', () => {
expect(redis.batch.batch[1]).toEqual(expect.any(Function))
})

it('should map batch length to length in pipeline',() => {
it('should map batch length to length in pipeline', () => {
const redis = new Redis()
const pipeline = redis.pipeline()

pipeline
.incr('user_next')
.incr('post_next');
pipeline.incr('user_next').incr('post_next')

expect(pipeline.length).toBe(2);
expect(pipeline.length).toBe(2)
})

it('allows for pipelining methods', () => {
Expand Down

0 comments on commit c77d31b

Please sign in to comment.