Jaime Leonardo Suncin Cruz
Jaime Leonardo Suncin Cruz
I had the same error and I solved (more like monkey-patched) using: ```javascript import { Repository } from 'typeorm'; import { createMockInstance } from 'jest-create-mock-instance'; const mockRepository = Object.assign(Object.create(Repository.prototype), createMockInstance(Repository));...
I finally fixed it —I think so— ```typescript import { Repository } from 'typeorm'; import { createMockInstance } from 'jest-create-mock-instance'; import { Article } from '../entities/article.entity'; const mockRepository = createMockInstance(Repository);...
I've found an error with `strict: true`: ```typescript import { Action, ThunkAction, configureStore } from '@reduxjs/toolkit'; import { connectRouter, routerMiddleware } from 'connected-react-router'; import { History, createBrowserHistory } from 'history';...
My approach to test is [https://github.com/leosuncin/literate/blob/master/__tests__/pages/api/auth/register.spec.ts](https://github.com/leosuncin/literate/blob/master/__tests__/pages/api/auth/register.spec.ts) I use @shelf/jest-mongodb to run MongoDB in-memory, but basically I use node-mocks-http to mock `req` and `res` objects
Another idea is to use supertest ```javascript import http from 'http'; import { apiResolver } from 'next/dist/next-server/server/api-utils'; import supertest from 'supertest'; import registerHandler from 'pages/api/auth/register'; jest.setTimeout(10e3); describe('[POST] /api/auth/register', () =>...
I had the same problem but with mongodb adapter, and the problem was I didn't pay attention to  So, the missing piece is set the session's strategy to jwt,...
Here [https://next-auth.js.org/configuration/providers/credentials](https://next-auth.js.org/configuration/providers/credentials) @pianomansam
I got the same issue, but I purchase ProtonVPN Plus I followed the [instructions here](https://protonvpn.com/support/linux-vpn-setup/)
It means: not work with P2P and Secure Core servers, besides normal servers
Also the issue is not related to overloaded servers