I don't see where is my error in this code, can you help me? import app from "../app"; ^^^^^^
I had add this "type": "module" in my package.json but my server stop to run.
const request = require("supertest"); import app from "../app"; describe("Test the root path", () => { test("It should response the GET method", () => { return request(app).get('/').then((res) => { expect(res.statusCode).toBe(200); }); }); });
requirewith"type": "module", Node returns the following error:ReferenceError: require is not defined in ES module scope, you can use import instead, also you are missing the.jsextension