0
const redis = require('redis-mock');
const asyncRedis = require('async-redis-mock');

const client = redis.createClient();
const asyncRedisClient = asyncRedis.decorate(client);
const cacheGroupId = require('../src/cacheGroupId');

describe('Set the cache', () => {
  test('it should set the cache with the groupName and Id', async () => {
    const data = await cacheGroupId.setGroupIdInCache(asyncRedisClient, 'Student', 'fsjhf676', '78gfhu-900hj-kj');
    expect(data).toBe(undefined);
    asyncRedisClient.quit();
  });
});

Test suite failed to run.

TypeError: Assignment to constant variable.
TypeError: Assignment to constant variable.

  1 | const redis = require('redis-mock');
> 2 | const asyncRedis = require('async-redis-mock');
    |                    ^
  3 |
  4 | const client = redis.createClient();
  5 | const asyncRedisClient = asyncRedis.decorate(client);

0 Answers0