Open salamisodikiolawale opened 1 year ago
Hey, this problem is not related to supertest.
in the last line of your app.ts you exported the app like that:
module.exports= app;
when importing it on movie.test.ts
, you imported destructuring your app object
import {app} from '../app';
when descructuring, this line of code is trying to access the property app
from your module.exports
, but app
is the module.exports
itself
the correct syntax would be
import app from '../app';
Describe the bug
Supertest connot read or find my adress route that i want test Node.js version: v19.0.0
OS version: 22.04
Description: If i use supertest to call pne route of my API i get this error
Actual behavior
Expected behavior
Code to reproduce
app.ts
movie.test.ts
pacckage.json
Checklist