Skip to content

Add tool for code coverage #1421

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

Closed
testn opened this issue Oct 16, 2021 · 0 comments
Closed

Add tool for code coverage #1421

testn opened this issue Oct 16, 2021 · 0 comments

Comments

@testn
Copy link
Contributor

testn commented Oct 16, 2021

Due to the mistake I made earlier, I just noticed that the code coverage we had wasn't good enough. Let's add the tool to cover it? I plan to use c8 to do this. @sidorares, if you are ok, we can probably figure out to add the output of this to github action as well?

-----------------------------------|---------|----------|---------|---------|-----------------------
File                               | % Stmts | % Branch | % Funcs | % Lines | Uncovered Line #s
-----------------------------------|---------|----------|---------|---------|-----------------------
All files                          |   88.27 |    83.84 |   78.96 |   88.27 |
 node-mysql2                       |   70.56 |    83.72 |   64.44 |   70.56 |
  index.js                         |   96.29 |      100 |   66.66 |   96.29 | 68,76,80
  promise.js                       |   66.78 |    81.81 |    64.1 |   66.78 | ...88-504,520,529-540
 node-mysql2/lib                   |   79.02 |    81.66 |   82.25 |   79.02 |
  auth_41.js                       |     100 |      100 |     100 |     100 |
  connection.js                    |   74.14 |    84.88 |   77.77 |   74.14 | ...58,762-763,895-934
  connection_config.js             |   90.23 |    82.53 |     100 |   90.23 | ...19,229-230,244-250
  helpers.js                       |   80.95 |      100 |      50 |   80.95 | 31-36,43-48
  packet_parser.js                 |   77.43 |    88.46 |      75 |   77.43 | ...4-61,84-97,148-161
  pool.js                          |   86.79 |    78.68 |     100 |   86.79 | ...55,169-170,176-178
  pool_cluster.js                  |    68.9 |    62.96 |   80.95 |    68.9 | ...50,254-255,261-270
  pool_config.js                   |   91.66 |    57.14 |     100 |   91.66 | 8-9
  pool_connection.js               |   73.84 |    88.88 |   66.66 |   73.84 | 14,29-31,34-44,53-54
  server.js                        |     100 |      100 |     100 |     100 |
 node-mysql2/lib/auth_plugins      |   64.61 |       70 |    87.5 |   64.61 |
  caching_sha2_password.js         |   81.55 |     61.9 |     100 |   81.55 | ...90-91,94-96,98-101
  mysql_native_password.js         |   84.37 |    85.71 |     100 |   84.37 | 18-22
  sha256_password.js               |      25 |      100 |      50 |      25 | 13-19,22-59
 node-mysql2/lib/commands          |   79.76 |    84.82 |   72.15 |   79.76 |
  auth_switch.js                   |   87.73 |    81.81 |     100 |   87.73 | ...-63,82-83,90-93,99
  binlog_dump.js                   |   37.61 |      100 |       0 |   37.61 | ...70-76,81-93,98-101
  change_user.js                   |     100 |      100 |     100 |     100 |
  client_handshake.js              |    61.5 |    76.66 |    62.5 |    61.5 | ...40,164,178,189-192
  close_statement.js               |     100 |      100 |     100 |     100 |
  command.js                       |   85.45 |      100 |   66.66 |   85.45 | 14-21
  execute.js                       |   96.26 |    83.33 |     100 |   96.26 | 56-57,86-87
  index.js                         |     100 |      100 |     100 |     100 |
  ping.js                          |      50 |      100 |       0 |      50 | 12-14,17-25,28-33
  prepare.js                       |   94.61 |     90.9 |     100 |   94.61 | 24-26,98-99,109-110
  query.js                         |   90.65 |    90.66 |    82.6 |   90.65 | ...73-274,278,314-315
  quit.js                          |     100 |      100 |     100 |     100 |
  register_slave.js                |   51.85 |      100 |       0 |   51.85 | 8-11,14-17,20-24
  server_handshake.js              |    75.3 |    54.16 |     100 |    75.3 | ...23,125,128,130-132
 node-mysql2/lib/constants         |     100 |      100 |     100 |     100 |
  charset_encodings.js             |     100 |      100 |     100 |     100 |
  charsets.js                      |     100 |      100 |     100 |     100 |
  client.js                        |     100 |      100 |     100 |     100 |
  commands.js                      |     100 |      100 |     100 |     100 |
  cursor.js                        |     100 |      100 |     100 |     100 |
  encoding_charset.js              |     100 |      100 |     100 |     100 |
  errors.js                        |     100 |      100 |     100 |     100 |
  field_flags.js                   |     100 |      100 |     100 |     100 |
  server_status.js                 |     100 |      100 |     100 |     100 |
  session_track.js                 |     100 |      100 |     100 |     100 |
  ssl_profiles.js                  |     100 |      100 |     100 |     100 |
  types.js                         |     100 |      100 |     100 |     100 |
 node-mysql2/lib/packets           |   86.88 |    83.63 |   83.82 |   86.88 |
  auth_switch_request.js           |     100 |      100 |     100 |     100 |
  auth_switch_request_more_data.js |   93.93 |      100 |      75 |   93.93 | 29-30
  auth_switch_response.js          |     100 |      100 |     100 |     100 |
  binary_row.js                    |   70.83 |      100 |       0 |   70.83 | 10-11,14-15,19-28
  binlog_dump.js                   |   51.51 |      100 |       0 |   51.51 | 13-17,20-30
  change_user.js                   |   73.19 |       50 |     100 |   73.19 | ...,62-80,86-87,89-90
  close_statement.js               |     100 |      100 |     100 |     100 |
  column_definition.js             |   97.18 |      100 |   85.71 |   97.18 | 106-109
  execute.js                       |      98 |    93.33 |     100 |      98 | 31,55-56
  handshake.js                     |   91.96 |    76.92 |     100 |   91.96 | 24-26,84-85,92-95
  handshake_response.js            |   89.65 |    77.27 |     100 |   89.65 | ...3-94,96-97,119-123
  index.js                         |   93.83 |    77.77 |      80 |   93.83 | 53-61
  packet.js                        |   86.83 |    83.11 |   88.88 |   86.83 | ...73,876-886,895-898
  prepare_statement.js             |     100 |      100 |     100 |     100 |
  prepared_statement_header.js     |     100 |      100 |     100 |     100 |
  query.js                         |     100 |      100 |     100 |     100 |
  register_slave.js                |    32.6 |      100 |       0 |    32.6 | 11-18,21-43
  resultset_header.js              |   91.81 |    87.09 |     100 |   91.81 | ...2-74,97-98,104-105
  ssl_request.js                   |      48 |      100 |       0 |      48 | 8-10,13-22
  text_row.js                      |    61.7 |    57.14 |   33.33 |    61.7 | ...,24-26,34-36,38-40
 node-mysql2/lib/parsers           |   95.56 |     90.6 |   83.33 |   95.56 |
  binary_parser.js                 |   95.69 |    89.06 |     100 |   95.69 | 36,50-51,174-178
  parser_cache.js                  |   88.67 |       90 |      50 |   88.67 | 41-43,45-47
  string.js                        |     100 |    84.61 |     100 |     100 | 28
  text_parser.js                   |    96.6 |    93.54 |     100 |    96.6 | 78-79,194-198
-----------------------------------|---------|----------|---------|---------|-----------------------
testn added a commit to testn/node-mysql2 that referenced this issue Oct 16, 2021
This will use c8 to generate lcov report so that we can see the code
coverage for our current tests
sidorares added a commit that referenced this issue Oct 16, 2021
Add tool for code coverage #1421
@testn testn closed this as completed Oct 18, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant