this is what it said after removing /test
Hi @Michael_Hayward,
Can you please ensure that you are running this test
command from the correct directory? I.e. the root directory where the package.json
file exists.
If so, please share the contents of your package.json
file.
If you have any doubts, please feel free to reach out to us.
Thanks and Regards.
Sourabh Bagrecha,
MongoDB
Hi @Michael_Hayward,
I don’t think that’s the correct package.json
file. The file should have the following structure:
{
"name": "server",
"version": "1.0.0",
"description": "",
"main": "index.js",
"scripts": {
"start": "nodemon -L ./index.js",
"test": "jest --passWithNoTests",
"test:watch": "jest --passWithNoTests --watch",
"changestream:update": "node test/lessons/change-updates.js",
"changestream:insert": "node test/lessons/change-insert.js"
},
"husky": {
"hooks": {
"pre-commit": "lint-staged"
}
},
"lint-staged": {
"linters": {
"*.js": [
"prettier --write",
"eslint --fix",
"npm test",
"git add"
]
},
"ignore": [
"**/build/**",
"**/data/**"
]
},
"keywords": [],
"author": "",
"license": "ISC",
"dependencies": {
"babel-eslint": "^9.0.0",
"bcryptjs": "^2.4.3",
"bluebird": "^3.5.1",
"body-parser": "^1.18.3",
"chai": "^4.1.2",
"cors": "^2.8.4",
"dotenv": "^6.0.0",
"eslint": "^4.19.1",
"eslint-config-prettier": "^3.1.0",
"eslint-config-react-app": "^2.1.0",
"eslint-plugin-flowtype": "^2.47.1",
"eslint-plugin-import": "^2.12.0",
"eslint-plugin-jsx-a11y": "^6.2.3",
"eslint-plugin-prettier": "^2.6.0",
"eslint-plugin-react": "^7.8.2",
"express": "^4.16.3",
"faker": "^4.1.0",
"jest-runner": "^24.9.0",
"jsonwebtoken": "^8.3.0",
"mocha": "^9.1.0",
"mongodb": "^3.1.6",
"morgan": "^1.9.1",
"npm-check-updates": "^3.1.21",
"prettier": "^1.14.3",
"sinon": "^5.0.10"
},
"devDependencies": {
"@babel/core": "^7.5.5",
"@babel/plugin-proposal-class-properties": "^7.0.0",
"@babel/plugin-proposal-decorators": "^7.0.0",
"@babel/plugin-proposal-do-expressions": "^7.0.0",
"@babel/plugin-proposal-export-default-from": "^7.0.0",
"@babel/plugin-proposal-export-namespace-from": "^7.0.0",
"@babel/plugin-proposal-function-sent": "^7.0.0",
"@babel/plugin-proposal-json-strings": "^7.0.0",
"@babel/plugin-proposal-logical-assignment-operators": "^7.0.0",
"@babel/plugin-proposal-nullish-coalescing-operator": "^7.0.0",
"@babel/plugin-proposal-numeric-separator": "^7.0.0",
"@babel/plugin-proposal-optional-chaining": "^7.0.0",
"@babel/plugin-proposal-pipeline-operator": "^7.0.0",
"@babel/plugin-proposal-throw-expressions": "^7.0.0",
"@babel/plugin-syntax-dynamic-import": "^7.0.0",
"@babel/plugin-syntax-import-meta": "^7.0.0",
"@babel/plugin-transform-runtime": "^7.5.5",
"@babel/preset-env": "^7.5.5",
"@babel/register": "^7.5.5",
"@babel/runtime": "^7.5.5",
"babel-core": "^7.0.0-bridge.0",
"babel-jest": "^27.0.6",
"concurrently": "^3.5.1",
"husky": "^1.0.0",
"jest": "^25.0.0",
"jest-cli": "^25.0.0",
"jest-express": "^1.6.0",
"lint-staged": "^7.3.0",
"nodemon": "^2.0.12"
}
}
I would suggest you to download the handouts again and follow the steps mentioned in Chapter 0.
If you have any doubts, please feel free to reach out to us.
Thanks and Regards.
Sourabh Bagrecha,
MongoDB