Workshop at gobelins school
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
app
e2e_tests
.coveralls.yml
.eslintrc
.gitignore
.npmrc
.travis.yml
Procfile
README.md
package-lock.json
package.json

README.md

express-app-testing-demo

This project is a simple express app for demonstrating testing and code coverage. Jest and Supertest are used for testing. Jest is also used for mocking functions and measuring code coverage. Note that this app only focuses on server-side JavaScript testing.

Requirements

Getting Started

  • Clone the repo
  • Install dependencies with npm install
  • Run server with npm start and go here: http://localhost:3000/

Running Tests

  • Run unit and integration tests: npm test
  • Run end-to-end tests: npm run test:e2e

Code Coverage Report

A new code coverage report is generated every time npm test runs. Normally this coverage report is ignored by git. This project includes it in source control so the coverage report can be viewed in the demo app: http://express-app-testing-demo.herokuapp.com/coverage/lcov-report/index.html