Skip to content

Commit 6b66984

Browse files
author
Felix Robles
committed
address comments
1 parent 64a9288 commit 6b66984

File tree

2 files changed

+18
-1
lines changed

2 files changed

+18
-1
lines changed

src/datastore/drivers/redis/RedisStore.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ export class RedisStore implements Process {
100100
)
101101
}
102102

103-
let result: R = await await promisify(
103+
let result: R = await promisify(
104104
this.client.eval.bind(this.client)
105105
)(script, ...args)
106106

tests/datastore/drivers/redis/RedisStore.spec.ts

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,21 @@ describe("RedisStore", () => {
4343

4444
expect(setResult).to.equal("OK")
4545
})
46+
47+
it("should throw errors", async () => {
48+
let hasThrown = false
49+
try {
50+
await testStore.sendCommand<string | null>("wrong command", [
51+
key,
52+
value,
53+
])
54+
55+
expect(false).to.equal(true)
56+
} catch (e) {
57+
hasThrown = true
58+
}
59+
expect(hasThrown).to.equal(true)
60+
})
4661
})
4762

4863
describe("eval", () => {
@@ -62,4 +77,6 @@ describe("RedisStore", () => {
6277
expect(setResult2).to.deep.equal([1, 2, 3])
6378
})
6479
})
80+
81+
6582
})

0 commit comments

Comments
 (0)