logo
0
2
Login

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.

About

演示: 1. 如何配置单元测试流水线 2. 如何配置覆盖率徽章 3. 如何查看覆盖率洞察数据

Language
CSS87%
JavaScript7.2%
SVG3.4%
HTML1.8%
Others0.6%