Conversation
| incr(key: string, pathAndAmount?: { [key: string]: number } | number): Promise<number>; | ||
| decr(key: string, pathAndAmount?: { [key: string]: number } | number): Promise<number>; |
There was a problem hiding this comment.
question: should we do multi types or method overloading with different types?
There was a problem hiding this comment.
btw this is just me wanting to know more about the decision 😓
i don't know or have preference for either
| const getRes = await puter.kv.get(TEST_KEY); | ||
| expect(getRes).toBe(0); | ||
| await puter.kv.set(TEST_KEY, 0); | ||
| const incrRes = await puter.kv.incr(TEST_KEY, { '': 5 }); |
There was a problem hiding this comment.
for 'should increment a key success' do we intend to have the argument? since other test below already include the argument
i wonder if this test is for without the argument
| const getRes = await puter.kv.get(TEST_KEY); | ||
| expect(getRes).toBe(5); | ||
| const getRes = await puter.kv.set(TEST_KEY, 0); | ||
| const decrRes = await puter.kv.decr(TEST_KEY, { '': 3 }); |
There was a problem hiding this comment.
same as above, i wonder if this test is for the one without pathAndAmount param
|
|
||
| it('should increment a key with second argument', async () => { | ||
| await puter.kv.set(TEST_KEY, 0); | ||
| const incrRes = await puter.kv.incr(TEST_KEY); |
There was a problem hiding this comment.
i think this test is missing the second argument
|
|
||
| it('should increment a key with second argument', async () => { | ||
| await puter.kv.set(TEST_KEY, 0); | ||
| const incrRes = await puter.kv.decr(TEST_KEY); |
There was a problem hiding this comment.
i think this test is missing the second argument
|
other than the test cases, i think this is good to go 🚀 |
06a3951 to
f0bfffb
Compare
No description provided.