Skip to content

Instantly share code, notes, and snippets.

@amazingandyyy
Last active January 7, 2017 21:21
Show Gist options
  • Save amazingandyyy/c2d928fde232c6a3a08cf9b13a806fd8 to your computer and use it in GitHub Desktop.
Save amazingandyyy/c2d928fde232c6a3a08cf9b13a806fd8 to your computer and use it in GitHub Desktop.
All about unit testing

write es6 in mocha testing files and nested files

(in package.json)

...
"scripts": {
      "test": "mocha --compilers js:babel-core/register --require ./test/test_helper.js --recursive ./test",
      "test:watch": "npm run test -- --watch"
}
...

test express api

(in somewhere)

...

test mongoDB and use fake db server

(in somewhere)

...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment