I am trying to learn how to run Jest tests on express.js, but I am getting this error
TypeError: express.json is not a function
but, if I comment out these 2 lines from the index.js:
app.use(express.json({limit: '50mb'}));
app.use(express.urlencoded({limit: '50mb', extended: true}));
then it would work and pass the first 2 tests. How could I fix this error?