Merge branch 'io' into merge-upstream
This commit is contained in:
commit
50e811e862
59 changed files with 534 additions and 410 deletions
|
@ -21,9 +21,10 @@ import type { TestingModule } from '@nestjs/testing';
|
|||
function mockRedis() {
|
||||
const hash = {};
|
||||
const set = jest.fn((key, value) => {
|
||||
const ret = hash[key];
|
||||
// このテストで呼び出すSETにはNXオプションが付いてる
|
||||
if (hash[key]) return null;
|
||||
hash[key] = value;
|
||||
return ret;
|
||||
return 'OK';
|
||||
});
|
||||
return set;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue