Giter VIP home page Giter VIP logo

nest-coverage-test's Introduction

NestJS Integration Testing Coverage

To Run

test:e2e:cov

Sample Output

> [email protected] test:e2e:cov
> nyc --silent npm run start & sleep 5 && npm run test:e2e && npx kill-port 3000 && nyc report


> [email protected] start
> nest start

[Nest] 12244  - 01/27/2023, 4:59:56 PM     LOG [NestFactory] Starting Nest application...
[Nest] 12244  - 01/27/2023, 4:59:56 PM     LOG [InstanceLoader] AppModule dependencies initialized +21ms
[Nest] 12244  - 01/27/2023, 4:59:56 PM     LOG [RoutesResolver] AppController {/}: +5ms
[Nest] 12244  - 01/27/2023, 4:59:56 PM     LOG [RouterExplorer] Mapped {/, GET} route +1ms
[Nest] 12244  - 01/27/2023, 4:59:56 PM     LOG [NestApplication] Nest application successfully started +2ms

> [email protected] test:e2e
> jest --config ./test/jest-e2e.json

 PASS  test/app.e2e-spec.ts
  โˆš Query Server (32 ms)

Test Suites: 1 passed, 1 total                                                                                                                                   
Tests:       1 passed, 1 total                                                                                                                                   
Snapshots:   0 total
Time:        1.784 s, estimated 2 s
Ran all test suites.
Process on port 3000 killed
-------------------|---------|----------|---------|---------|-------------------
File               | % Stmts | % Branch | % Funcs | % Lines | Uncovered Line #s
-------------------|---------|----------|---------|---------|-------------------
All files          |       0 |      100 |       0 |       0 |                  
 app.controller.ts |       0 |      100 |       0 |       0 | 1-10             
 app.module.ts     |       0 |      100 |     100 |       0 | 1-10             
 app.service.ts    |       0 |      100 |       0 |       0 | 1-6              
 main.ts           |       0 |      100 |       0 |       0 | 5-8              
-------------------|---------|----------|---------|---------|-------------------

=============================== Coverage summary ===============================
Statements   : 0% ( 0/22 )
Branches     : 100% ( 0/0 )
Functions    : 0% ( 0/4 )
Lines        : 0% ( 0/16 )
================================================================================

Process finished with exit code 0

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.