ioredis-mock icon indicating copy to clipboard operation
ioredis-mock copied to clipboard

Lua return nil returns undefined instead of null

Open sean256 opened this issue 4 years ago • 1 comments

const MockRedis = require('ioredis-mock');

const redis = new MockRedis();

(async () => {
	redis.defineCommand('nilTest', { numberOfKeys: 0, lua: 'return nil' });
	const result = await redis.nilTest();
	console.log(result); // outputs undefined instead of null
})();

sean256 avatar Feb 11 '21 23:02 sean256

Hey @sean256! Thanks for the report 👍

I don't have time to work on this myself but PRs welcome and I'll push out a fix faster than you can say "merge my PR" if anyone steps up 😄

stipsan avatar Feb 23 '21 00:02 stipsan