Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[informational] Code coverage for build #394

Open
t2ym opened this issue Oct 5, 2020 · 0 comments
Open

[informational] Code coverage for build #394

t2ym opened this issue Oct 5, 2020 · 0 comments

Comments

@t2ym
Copy link
Owner

t2ym commented Oct 5, 2020

[informational] Code coverage for build

Commands

nyc npm run build
nyc report --reporter=lcov
google-chrome coverage/lcov-report/index.html 

Note

  • It is strange that demo-config/config.js is not present
    • Root Cause: nyc is too old to handle class properties in demo-config/config.js
    • Fix: Use nyc 15.1.0

Output (text report)

---------------------------------------------------------|----------|----------|----------|----------|----------------|
File                                                     |  % Stmts | % Branch |  % Funcs |  % Lines |Uncovered Lines |
---------------------------------------------------------|----------|----------|----------|----------|----------------|
All files                                                |     58.4 |       49 |    33.66 |    60.51 |                |
 thin-hook                                               |    99.51 |    88.89 |    95.65 |    99.51 |                |
  gulpfile.js                                            |    99.47 |    88.89 |    95.65 |    99.47 |            383 |
  hook.js                                                |      100 |      100 |      100 |      100 |                |
 thin-hook/demo-backend                                  |    73.23 |    62.63 |       90 |    73.06 |                |
  cacheBundleGeneration.js                               |    85.71 |    73.33 |      100 |    85.37 |... 162,168,169 |
  cacheBundleUploadService.js                            |    27.66 |     5.56 |      100 |    27.66 |... 86,87,88,89 |
  integrityService.js                                    |     75.4 |    65.56 |    88.24 |     75.3 |... 1,1002,1003 |
 thin-hook/demo-backend/validation-console               |      100 |    77.78 |      100 |      100 |                |
  rollup.config.js                                       |      100 |    77.78 |      100 |      100 |          43,45 |
 thin-hook/demo-config                                   |    94.59 |    84.62 |    95.65 |    94.54 |                |
  Tracer.js                                              |    94.59 |    84.62 |    95.65 |    94.54 |... 257,271,275 |
 thin-hook/demo-config/frontend-components               |      100 |      100 |      100 |      100 |                |
  targets.js                                             |      100 |      100 |      100 |      100 |                |
 thin-hook/demo-config/gzip-frontend                     |      100 |      100 |      100 |      100 |                |
  targets.js                                             |      100 |      100 |      100 |      100 |                |
 thin-hook/demo-config/integrity-json                    |      100 |      100 |      100 |      100 |                |
  targets.js                                             |      100 |      100 |      100 |      100 |                |
 thin-hook/examples/plugins/examples                     |      100 |      100 |      100 |      100 |                |
  configurator.js                                        |      100 |      100 |      100 |      100 |                |
 thin-hook/examples/plugins/module-examples              |    98.18 |       75 |      100 |    98.15 |                |
  configurator.js                                        |    98.18 |       75 |      100 |    98.15 |             61 |
 thin-hook/examples/plugins/module-examples-dependencies |      100 |      100 |      100 |      100 |                |
  configurator.js                                        |      100 |      100 |      100 |      100 |                |
 thin-hook/examples/plugins/script-examples              |      100 |      100 |      100 |      100 |                |
  configurator.js                                        |      100 |      100 |      100 |      100 |                |
 thin-hook/lib                                           |    43.93 |    45.17 |     4.79 |    46.69 |                |
  context-generator.js                                   |     62.5 |       44 |    22.22 |    66.67 |... 69,77,81,86 |
  hook-callback.js                                       |     0.44 |        0 |     0.25 |     0.72 |... 705,706,710 |
  native-wrapper.js                                      |     2.43 |     3.57 |     1.59 |     2.44 |... 8,1530,1533 |
  preprocess.js                                          |    67.28 |    66.41 |    35.38 |     67.3 |... 1,5512,5513 |
  service-worker.js                                      |     4.71 |     2.49 |      2.7 |      4.8 |... 754,755,757 |
 thin-hook/plugins/about-blank-redirector                |      100 |    66.67 |      100 |      100 |                |
  configurator.js                                        |      100 |    66.67 |      100 |      100 |          18,19 |
 thin-hook/plugins/automation-secret                     |    94.74 |    64.29 |      100 |    94.59 |                |
  configurator.js                                        |    94.74 |    64.29 |      100 |    94.59 |          55,56 |
 thin-hook/plugins/build                                 |    95.38 |    92.31 |      100 |    95.31 |                |
  build-helpers.js                                       |      100 |    92.31 |      100 |      100 |           7,22 |
  configurator.js                                        |    93.88 |      100 |      100 |    93.75 |       79,80,81 |
 thin-hook/plugins/build-coverage                        |    93.88 |      100 |      100 |    93.75 |                |
  configurator.js                                        |    93.88 |      100 |      100 |    93.75 |       79,80,81 |
 thin-hook/plugins/build-instrument                      |    92.31 |       50 |      100 |    91.67 |                |
  configurator.js                                        |    92.31 |       50 |      100 |    91.67 |             16 |
 thin-hook/plugins/build-test                            |      100 |      100 |      100 |      100 |                |
  configurator.js                                        |      100 |      100 |      100 |      100 |                |
 thin-hook/plugins/build-test-html                       |      100 |      100 |      100 |      100 |                |
  configurator.js                                        |      100 |      100 |      100 |      100 |                |
 thin-hook/plugins/bundle-browserify                     |      100 |     62.5 |      100 |      100 |                |
  configurator.js                                        |      100 |     62.5 |      100 |      100 |... 39,50,51,52 |
 thin-hook/plugins/bundle-rollup                         |      100 |       50 |      100 |      100 |                |
  configurator.js                                        |      100 |       50 |      100 |      100 |... 26,40,41,42 |
 thin-hook/plugins/bundle-webpack                        |      100 |       50 |      100 |      100 |                |
  configurator.js                                        |      100 |       50 |      100 |      100 |... 25,38,39,40 |
 thin-hook/plugins/bundler-helpers                       |    95.54 |    82.09 |      100 |    95.54 |                |
  bundlerContextGeneratorFactory.js                      |    92.68 |    86.67 |      100 |    92.68 |       17,62,69 |
  configurator.js                                        |      100 |       75 |      100 |      100 |             19 |
  contextGeneratorHelper.js                              |      100 |      100 |      100 |      100 |                |
  hookTransformFactory.js                                |      100 |     87.5 |      100 |      100 |             13 |
  importMapperFactory.js                                 |    92.31 |       60 |      100 |    92.31 |          28,35 |
 thin-hook/plugins/cache-automation-js                   |      100 |       50 |      100 |      100 |                |
  configurator.js                                        |      100 |       50 |      100 |      100 |             15 |
 thin-hook/plugins/cache-bundle-automation-json          |      100 |       50 |      100 |      100 |                |
  configurator.js                                        |      100 |       50 |      100 |      100 |             13 |
 thin-hook/plugins/cache-bundle-js                       |      100 |    64.29 |      100 |      100 |                |
  configurator.js                                        |      100 |    64.29 |      100 |      100 | 14,16,58,59,60 |
 thin-hook/plugins/certificates                          |      100 |       50 |      100 |      100 |                |
  configurator.js                                        |      100 |       50 |      100 |      100 |    11,12,16,19 |
 thin-hook/plugins/clean-frontend                        |      100 |      100 |      100 |      100 |                |
  configurator.js                                        |      100 |      100 |      100 |      100 |                |
 thin-hook/plugins/clean-gzip-json                       |      100 |      100 |      100 |      100 |                |
  configurator.js                                        |      100 |      100 |      100 |      100 |                |
 thin-hook/plugins/content-loader-js                     |      100 |       50 |      100 |      100 |                |
  configurator.js                                        |      100 |       50 |      100 |      100 |       17,18,19 |
 thin-hook/plugins/context-generator-js                  |      100 |     62.5 |      100 |      100 |                |
  configurator.js                                        |      100 |     62.5 |      100 |      100 |... 53,60,61,62 |
 thin-hook/plugins/demo-convert-full                     |    36.84 |        0 |    33.33 |    38.89 |                |
  configurator.js                                        |    36.84 |        0 |    33.33 |    38.89 |... 23,24,25,28 |
 thin-hook/plugins/demo-convert-skinny                   |    36.84 |        0 |    33.33 |    38.89 |                |
  configurator.js                                        |    36.84 |        0 |    33.33 |    38.89 |... 23,24,25,28 |
 thin-hook/plugins/demo-gulpfile-js                      |      100 |      100 |      100 |      100 |                |
  configurator.js                                        |      100 |      100 |      100 |      100 |                |
 thin-hook/plugins/dependency-graph                      |      100 |      100 |      100 |      100 |                |
  configurator.js                                        |      100 |      100 |      100 |      100 |                |
 thin-hook/plugins/disable-devtools                      |      100 |    58.33 |      100 |      100 |                |
  configurator.js                                        |      100 |    58.33 |      100 |      100 | 16,27,39,40,41 |
 thin-hook/plugins/dummy-integrity                       |      100 |       50 |      100 |      100 |                |
  configurator.js                                        |      100 |       50 |      100 |      100 |             13 |
 thin-hook/plugins/frontend-components                   |      100 |      100 |      100 |      100 |                |
  configurator.js                                        |      100 |      100 |      100 |      100 |                |
 thin-hook/plugins/generate-cert-sh                      |      100 |       75 |      100 |      100 |                |
  configurator.js                                        |      100 |       75 |      100 |      100 |             15 |
 thin-hook/plugins/generate-import-maps                  |    97.67 |    83.33 |      100 |    97.67 |                |
  configurator.js                                        |    97.67 |    83.33 |      100 |    97.67 |             44 |
 thin-hook/plugins/get-version                           |      100 |       75 |      100 |      100 |                |
  configurator.js                                        |      100 |       75 |      100 |      100 |             13 |
 thin-hook/plugins/gzip-frontend                         |      100 |      100 |      100 |      100 |                |
  configurator.js                                        |      100 |      100 |      100 |      100 |                |
 thin-hook/plugins/gzip-json                             |      100 |      100 |      100 |      100 |                |
  configurator.js                                        |      100 |      100 |      100 |      100 |                |
 thin-hook/plugins/hook-native-api-js                    |      100 |       50 |      100 |      100 |                |
  configurator.js                                        |      100 |       50 |      100 |      100 |       17,18,19 |
 thin-hook/plugins/injector-helpers                      |      100 |       75 |      100 |      100 |                |
  configurator.js                                        |      100 |       75 |      100 |      100 |             43 |
 thin-hook/plugins/integrity-js                          |      100 |       60 |      100 |      100 |                |
  configurator.js                                        |      100 |       60 |      100 |      100 |    17,45,46,47 |
 thin-hook/plugins/integrity-json                        |    98.25 |       90 |      100 |    98.18 |                |
  configurator.js                                        |    98.25 |       90 |      100 |    98.18 |             28 |
 thin-hook/plugins/keys                                  |    95.16 |    58.33 |      100 |    95.16 |                |
  configurator.js                                        |    95.16 |    58.33 |      100 |    95.16 |    120,121,128 |
 thin-hook/plugins/mark-parsed-js                        |      100 |       50 |      100 |      100 |                |
  configurator.js                                        |      100 |       50 |      100 |      100 |       17,18,19 |
 thin-hook/plugins/policy                                |      100 |    58.33 |      100 |      100 |                |
  configurator.js                                        |      100 |    58.33 |      100 |      100 | 16,28,59,60,61 |
 thin-hook/plugins/script-hashes                         |    95.31 |    78.05 |      100 |    95.24 |                |
  configurator.js                                        |    95.31 |    78.05 |      100 |    95.24 |       48,49,51 |
 thin-hook/plugins/script-hashes-integrity               |      100 |       50 |      100 |      100 |                |
  configurator.js                                        |      100 |       50 |      100 |      100 |             16 |
 thin-hook/plugins/script-hashes-js                      |      100 |       50 |      100 |      100 |                |
  configurator.js                                        |      100 |       50 |      100 |      100 |       17,18,19 |
 thin-hook/plugins/target-injector                       |    46.03 |     34.2 |     47.5 |    46.18 |                |
  HtmlInjectionHandlerFactory.js                         |     2.88 |        0 |     5.56 |     2.91 |... 174,178,181 |
  InjectionHandlerBase.js                                |       40 |      100 |       25 |       40 |       10,13,16 |
  Injector.js                                            |    74.31 |    52.56 |      100 |    74.31 |... 195,196,198 |
  JsInjectionHandlerFactory.js                           |     63.1 |     62.3 |    85.71 |     63.1 |... 176,178,182 |
 thin-hook/plugins/wrap-globals-js                       |      100 |       50 |      100 |      100 |                |
  configurator.js                                        |      100 |       50 |      100 |      100 |       17,18,19 |
---------------------------------------------------------|----------|----------|----------|----------|----------------|
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant