纽约返回空结果

时间:2019-07-29 05:12:47

标签: node.js code-coverage

我使用gulpjs docs on glob separators库检查测试覆盖率。

当我运行测试并成功通过测试时,我得到一个空表。

----------|----------|----------|----------|----------|-------------------|
File      |  % Stmts | % Branch |  % Funcs |  % Lines | Uncovered Line #s |
----------|----------|----------|----------|----------|-------------------|
All files |        0 |        0 |        0 |        0 |                   |
----------|----------|----------|----------|----------|-------------------|

但是当其中一项测试失败时,表将被填充。

File                       |  % Stmts | % Branch |  % Funcs |  % Lines | Uncovered Line #s |
---------------------------|----------|----------|----------|----------|-------------------|
All files                  |    31.64 |     9.25 |    11.76 |    31.86 |                   |
 src                       |    96.55 |      100 |    66.67 |    96.55 |                        |
  index.js                 |    96.43 |      100 |    66.67 |    96.43 |                44 |
 src/config                |    93.75 |       80 |      100 |    93.75 |                   |
  constants.js             |      100 |      100 |      100 |      100 |                   |
  multer.config.js         |    88.89 |       80 |      100 |    88.89 |                13 |
  s3.config.js             |      100 |      100 |      100 |      100 |                   |
 src/controllers           |     30.5 |     6.49 |    10.68 |    30.77 |                   |
  activateProducts.js      |    30.34 |     5.56 |    22.22 |    29.89 |... 26,130,131,138 |
  admins.js                |    18.92 |        0 |        0 |    18.92 |... 59,265,271,277 |
  bookmarks.js             |    61.29 |    33.33 |    66.67 |       60 |... 42,43,48,49,56 |
  categories.js            |    15.38 |        0 |        0 |       16 |... 98,205,213,219 |
  comments.js              |    20.83 |        0 |        0 |    21.74 |... 31,132,139,147 |
  configurations.js        |    16.26 |        0 |        0 |    17.39 |... 94,199,200,207 |
  filters.js               |    19.15 |        0 |        0 |       20 |... 77,81,82,86,87 |
  followers.js             |    22.67 |        0 |        0 |    23.61 |... 21,127,128,135 |
  likes_merchants.js       |    31.71 |        0 |        0 |     32.5 |... 58,59,66,67,74 |
  likes_products.js        |    31.71 |        0 |        0 |     32.5 |... 58,59,66,67,74 |
  locations.js             |    15.69 |        0 |        0 |    16.33 |... 26,233,241,247 |
  locationsType.js         |     18.6 |        0 |        0 |    19.51 |... 60,167,175,181 |
  merchants.js             |    34.62 |        0 |        0 |       36 |... 26,27,34,35,42 |
  merchantsSignup.js       |    26.56 |        0 |        0 |    26.56 |... 16,218,219,221 |
  merchantsVerifyPhone.js  |    39.02 |        0 |        0 |    39.02 |... 75,79,84,85,92 |
  products.js              |    47.24 |    20.62 |    52.17 |    46.39 |... 16,422,428,434 |
  productsSold.js          |    51.35 |       20 |       50 |       50 |... 49,54,55,62,70 |
  saveTokenOfUsers.js      |    40.74 |        0 |        0 |    42.31 |... 35,36,41,42,49 |
  updateLocationOUsers.js  |    28.07 |        0 |        0 |    28.57 |... 3,94,98,99,106 |
  userBookmarks.js         |    73.17 |       50 |       50 |    71.79 |... 44,53,54,61,69 |
  userProducts.js          |     81.4 |       50 |       50 |    80.49 |... 42,58,59,66,74 |
  users.js                 |    15.91 |        0 |        0 |    16.41 |
---------------------------|----------|----------|----------|----------|-------------------|

可以连接什么?

我的主要测试文件,在其中导入其余测试。

import './products/allProductsTest';

产品测试文件夹。

products:
  - addProductsTest.js
  - allProductsTest.js
  - deleteProductsTest.js
  - getProductTest.js
  - listProductsTest.js
  - updateProductsTest.js

0 个答案:

没有答案