I'm a complete newbie at unit testing with JS, so I might as well be doing something wrong. Here's my current package.json
:
{
"name": "slack-lunch",
"version": "1.0.0",
"main": "index.js",
"scripts": {
"dev": "nodemon server.js",
"test": "./node_modules/.bin/mocha --recursive --compilers js:babel-core/register",
"tdd": "./node_modules/.bin/mocha --recursive --compilers js:babel-core/register -w"
},
"keywords": [
"slack",
"lunch",
"express",
"node"
],
"author": "felipecao",
"license": "ISC",
"dependencies": {
"body-parser": "^1.17.1",
"ejs": "^2.5.6",
"express": "^4.15.2",
"mongodb": "^2.2.25",
"mongoose": "^4.9.2",
"mongoose-random": "^0.1.1"
},
"devDependencies": {
"babel-core": "^6.24.0",
"babel-loader": "^6.4.1",
"babel-preset-es2015": "^6.24.0",
"chai": "^3.5.0",
"mocha": "^3.2.0",
"nodemon": "^1.11.0",
"proxyquire": "^1.7.11",
"sinon": "^2.1.0",
"sinon-mongoose": "^1.3.0"
}
}
npm info it worked if it ends with ok
npm verb cli [ '/Users/felipe/.nvm/versions/node/v5.1.0/bin/node',
npm verb cli '/Users/felipe/.nvm/versions/node/v5.1.0/bin/npm',
npm verb cli 'install',
npm verb cli '-D',
npm verb cli 'sinon-mongoose',
npm verb cli '--verbose' ]
npm info using [email protected]
npm info using [email protected]
npm verb get https://registry.npmjs.org/sinon-mongoose not expired, no request
npm verb cache add spec sinon-mongoose@^1.3.0
npm verb addNamed ">=1.3.0 <2.0.0" is a valid semver range for sinon-mongoose
npm verb addNameRange registry:https://registry.npmjs.org/sinon-mongoose not in flight; fetching
npm verb get https://registry.npmjs.org/sinon-mongoose not expired, no request
npm verb addNamed "1.3.0" is a plain semver version for sinon-mongoose
npm verb afterAdd /Users/felipe/.npm/sinon-mongoose/1.3.0/package/package.json not in flight; writing
npm verb afterAdd /Users/felipe/.npm/sinon-mongoose/1.3.0/package/package.json written
npm verb lock using /Users/felipe/.npm/_locks/staging-113bc65bdcf82ac5.lock for /Users/felipe/workspace/github/slack-lunch/node_modules/.staging
npm verb unbuild node_modules/.staging/sinon-mongoose-1eb3c89e3c82681aae026f0e5665eab6
npm verb gentlyRm don't care about contents; nuking /Users/felipe/workspace/github/slack-lunch/node_modules/.staging/sinon-mongoose-1eb3c89e3c82681aae026f0e5665eab6
npm verb tar unpack /Users/felipe/.npm/sinon-mongoose/1.3.0/package.tgz
npm verb tar unpacking to /Users/felipe/workspace/github/slack-lunch/node_modules/.staging/sinon-mongoose-1eb3c89e3c82681aae026f0e5665eab6
npm verb gentlyRm don't care about contents; nuking /Users/felipe/workspace/github/slack-lunch/node_modules/.staging/sinon-mongoose-1eb3c89e3c82681aae026f0e5665eab6
npm info lifecycle [email protected]~preinstall: [email protected]
npm info linkStuff [email protected]
npm verb linkBins [email protected]
npm verb linkMans [email protected]
npm info lifecycle [email protected]~install: [email protected]
npm info lifecycle [email protected]~postinstall: [email protected]
npm verb unlock done using /Users/felipe/.npm/_locks/staging-113bc65bdcf82ac5.lock for /Users/felipe/workspace/github/slack-lunch/node_modules/.staging
npm verb saving [ { name: 'sinon-mongoose',
npm verb saving spec: '^1.3.0',
npm verb saving save: 'devDependencies' } ]
[email protected] /Users/felipe/workspace/github/slack-lunch
├── UNMET PEER DEPENDENCY [email protected]
└── [email protected]
npm WARN EPEERINVALID [email protected] requires a peer of sinon@1 but none was installed.
npm WARN EPACKAGEJSON [email protected] No repository field.
npm verb exit [ 0, true ]
npm info ok