docs: add node.js native test runner to coverage page

What does this MR do and why?

Adds node:test (aka Node.js Native Test Runner) and how to collect coverage for GitLab to the list of Node.js coverage regex patterns.

In Node v20+, we can now run tests and coverage from Node.js without any external dependencies. I'm using these for my own projects already and quite pleased with the results. The test runner is stable, but coverage is experimental.

References

The badge itself:

Here is how the output of the coverage command looks FYI:

ℹ ----------------------------------------------------------------------------------------------------------------------------------------------------------
ℹ file                                 | line % | branch % | funcs % | uncovered lines
ℹ ----------------------------------------------------------------------------------------------------------------------------------------------------------
ℹ src                                  |        |          |         | 
ℹ  cli                                 |        |          |         | 
ℹ   commands                           |        |          |         | 
ℹ    bot-token.js                      |  26.02 |   100.00 |    0.00 | 23-75 81-111 117-123
ℹ    init.js                           |  97.67 |    75.00 |  100.00 | 18-19
ℹ    run.js                            |  23.73 |   100.00 |    0.00 | 15-59
ℹ    twitch-id.js                      |  19.35 |   100.00 |    0.00 | 13-62
ℹ   program.js                         | 100.00 |   100.00 |  100.00 | 
ℹ   theme.js                           | 100.00 |   100.00 |   25.00 | 
ℹ  config.js                           |  88.39 |    73.33 |   85.71 | 169-171 193-194 221-239 260-266
ℹ  emoticons.js                        | 100.00 |   100.00 |  100.00 | 
ℹ  i18n                                |        |          |         | 
ℹ   messages.js                        |  93.41 |    70.00 |  100.00 | 76-77 83-84 88-89
ℹ  matrix                              |        |          |         | 
ℹ   bot-utils.js                       |  44.44 |   100.00 |    0.00 | 9-18
ℹ   event-handlers.js                  |  87.10 |   100.00 |    0.00 | 16-17 29-30
ℹ   handlers                           |        |          |         | 
ℹ    admin-room-invite-handler.js      |  69.44 |    50.00 |    0.00 | 17-19 28-35
ℹ    reset-subscriptions-handler.js    |  60.42 |    50.00 |    0.00 | 13 22-26 35-47
ℹ   matrix-bot.js                      |  51.69 |    50.00 |    0.00 | 27-40 48-51 60-65 68-69 76-85 96-106 114-115 124-125 143-163 169-173 179-195 201-206
ℹ   matrix-service.js                  |  78.57 |    50.00 |    0.00 | 11-12 24-27
ℹ  tempfiles.js                        | 100.00 |   100.00 |  100.00 | 
ℹ  twitch                              |        |          |         | 
ℹ   event-handlers.js                  |  90.00 |   100.00 |    0.00 | 18-19
ℹ   handlers                           |        |          |         | 
ℹ    stream-status-change-handler.js   |  96.48 |    80.00 |  100.00 | 61 78-79 99-100
ℹ   twitch-service.js                  |  46.73 |    50.00 |    0.00 | 9-13 21-27 36-47 50-51 59-82 88-89 96-97 104-106
ℹ  utils.js                            | 100.00 |   100.00 |  100.00 | 
ℹ ----------------------------------------------------------------------------------------------------------------------------------------------------------
ℹ all files                            |  70.73 |    79.75 |   38.24 | 
ℹ ----------------------------------------------------------------------------------------------------------------------------------------------------------
ℹ end of coverage report

Screenshots or screen recordings

N/A

How to set up and validate locally

N/A

MR acceptance checklist

Evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.

Edited by Seth Falco

Merge request reports

Loading