npm ioredis-mock 6.1.0
v6.1.0

latest releases: 8.9.0, 7.5.1, 8.8.3...
2 years ago

6.1.0 (2022-01-28)

Features

  • add browser build & deprecate jest build (#1123) (b0e02e1)

Browser usage (Experimental)

There's a browser build available. You can import it directly (import Redis from 'ioredis-mock/browser.js'), or use it on unpkg.com:

import Redis from 'https://unpkg.com/ioredis-mock';

const redis = new Redis();
redis.set('foo', 'bar');
console.log(await redis.get('foo'));

ioredis-mock/jest.js is deprecated

ioredis-mock is no longer doing a import { Command } from 'ioredis' internally, it's now doing a direct import import Command from 'ioredis/built/command' and thus the jest.js workaround is no longer needed:

-jest.mock('ioredis', () => require('ioredis-mock/jest'))
+jest.mock('ioredis', () => require('ioredis-mock'))

Don't miss a new ioredis-mock release

NewReleases is sending notifications on new releases.