skip to Main Content

How to mock Jest Redis in Nestjs

I'm working on NestJs application and wrote unit test for my authenticateUser function in user.service.ts.It's has pass in my local machine.but when I deployed it in to server and run unit test, i got an error Redis connection to 127.0.0.1:6379…

VIEW QUESTION

Jest watch interactive with docker-compose – Phpmyadmin

I have this docker compose file: version: "2.4" services: mysql: image: mysql:8.0 environment: - MYSQL_ROOT_PASSWORD=mypasswd healthcheck: test: ["CMD", "mysqladmin", "ping", "-h", "localhost"] timeout: 20s retries: 10 phpmyadmin: image: phpmyadmin/phpmyadmin:latest ports: - 8080:80 environment: - PMA_HOST=mysql depends_on: mysql: condition: service_healthy app:…

VIEW QUESTION

Redis – Jest + nest.js, absolute paths for tests

Here's my jest config inside of package.json: "jest": { "moduleFileExtensions": [ "js", "json", "ts" ], "moduleDirectories":["node_modules", "src"], // tried to solve the issue like that "rootDir": "src", "testRegex": ".spec.ts$", "transform": { "^.+\.(t|j)s$": "ts-jest" }, "coverageDirectory": "../coverage", "testEnvironment": "node" } AFAIK…

VIEW QUESTION
Back To Top
Search