When I try to initiate and connect with a new driver and run "npm run test 01"
I get test fails.
I checkout the git checkout 01-connect-to-neo4j and add my uri, user, password and run npm run test 01 and it passes.
So I copied the entire file and went back to the main branch and with the neo4j.js file removed all the content and pasted in the code that worked . Ran it - and it FAILED... stuck - help
> neoflix-api-node@0.1.0 test
> node --experimental-vm-modules node_modules/jest/bin/jest.js 01
(node:1233) ExperimentalWarning: VM Modules is an experimental feature. This feature could change at any time
(Use `node --trace-warnings ...` to show where the warning was created)
Browserslist: caniuse-lite is outdated. Please run:
npx browserslist@latest --update-db
Why you should do it regularly: https://github.com/browserslist/browserslist#browsers-data-updating
FAIL test/challenges/01-connect-to-neo4j.spec.js
01. Initiate Driver
✓ Should create a driver instance and connect to server (1 ms)
✕ Driver has been instantiated (1 ms)
✕ Driver can verify connectivity
● 01. Initiate Driver › Driver has been instantiated
at Object. (test/challenges/01-connect-to-neo4j.spec.js:34:24)
Test Suites: 1 failed, 1 total
Tests: 2 failed, 1 passed, 3 total
Snapshots: 0 total
Time: 0.811 s
Ran all test suites matching /01/i.
gitpod /workspace/app-nodejs (main) $
@DrAli - Which course are you talking about specifically? Also - you mention failures, but you don't share what those failures are. Kind of hard to help...
I just copied and pasted from the other branch - and got it to work that way. There are differences in the code that may explain the first one failing - but those changes were not part of the assignment - specifically the export closeDriver function lines 59 to 61
You should be able to copy and paste your code into the reply window and wrap it in backticks to format it correctly. I would like to understand what has happened in your case so I can make sure that others don't run into the same issue.