Skip to content

Impossible to mock in unit tests #286

@MFrat

Description

@MFrat

It is not possible to mock @InjectRedis() private readonly redis: Redis in unit tests. The following error occurs:

ENOENT: no such file or directory, open 'node:child_process'

      at Runtime.readFile (node_modules/jest-runtime/build/index.js:1987:21)
      at Object.<anonymous> (node_modules/check-disk-space/dist/check-disk-space.cjs:5:26)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions