All tests with problems to run

All test failed with this error:

raragao@megasite01:~/disk2/Workspace/personal/mflix-js$ npm test -t mongoclient

server@1.0.0 test /home/raragao/disk2/Workspace/personal/mflix-js
jest --passWithNoTests “mongoclient”

TypeError: blacklist.includes is not a function
at shouldSkipValidationForPath (/home/raragao/disk2/Workspace/personal/mflix-js/node_modules/jest-validate/build/validate.js:42:17)
at _validate (/home/raragao/disk2/Workspace/personal/mflix-js/node_modules/jest-validate/build/validate.js:93:8)
at validate (/home/raragao/disk2/Workspace/personal/mflix-js/node_modules/jest-validate/build/validate.js:123:20)
at normalize (/home/raragao/disk2/Workspace/personal/mflix-js/node_modules/jest-config/build/normalize.js:472:72)
at readConfig (/home/raragao/disk2/Workspace/personal/mflix-js/node_modules/jest-config/build/index.js:184:68)
at projects.filter.hasDeprecationWarnings (/home/raragao/disk2/Workspace/personal/mflix-js/node_modules/jest-cli/build/cli/index.js:473:77)
at /home/raragao/disk2/Workspace/personal/mflix-js/node_modules/jest-cli/build/cli/index.js:251:23
at next (native)
at step (/home/raragao/disk2/Workspace/personal/mflix-js/node_modules/jest-cli/build/cli/index.js:206:30)
at /home/raragao/disk2/Workspace/personal/mflix-js/node_modules/jest-cli/build/cli/index.js:225:14
npm ERR! Test failed. See above for more details.

It might be that your .env is not correct. Could you please share its content with us?

Sure, but app works fine, only tests are with this error.

File name .env

# Ticket: Connection
# Rename this file to .ini after filling in your MFLIX_DB_URI and your SECRET_KEY
# Do not surround the URI with quotes 


raragao@megasite01:~/disk2/Workspace/personal/mflix-js$ node -v
raragao@megasite01:~/disk2/Workspace/personal/mflix-js$ npm -v

Did you run npm install?

Yes, as I said, the app works fine. My problems is with shell unit test only.

I think that you did not run on the root of mflix the command “npm i” or “npm install” is the same. But tell us, when you run “npm start” you can access to “http://localhost:5000” and you watch all the site of mflix ?

Yes, my app start normally. I get my tickets normally, but tests in shell not works.

I found the problem.

I’m using two shell sessions to work. One with a npm start and other with npm test -t …

But, second shell was using wrong node version.

Sorry guys !

Sorry @raragao, I did not see in you original message that the app is working fine. I only saw:

with a bunch of stack trace. I asked about npm install because messages like blacklist.includes is not a function might indicated missing dependencies.

1 Like

Thank you @steevej-1495.

Wow, incredible, good for you that you noticed that little detail.

Yeah, I use NVM to change Node versions, then I forgot that if you don’t set version to default, when you open a new shell session the default version is got.

Now I put default to version 10. :wink:

I did not know about NVM. I will read about it. Thanks

With NVM you can have many versions of Node in same machine. It is very useful to dev machine.

1 Like