-
-
Notifications
You must be signed in to change notification settings - Fork 2.5k
chore: setup borp reporter for switch to node test #5720
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
chore: setup borp reporter for switch to node test #5720
Conversation
test/test-reporter.mjs
Outdated
| async function * reporter (source) { | ||
| const failed = new Set() | ||
| const diagnostics = new Set() | ||
| diagnostics.add('\n\n') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's leave formatting of output to the display section of the code and only display diagnostic messages when any exist (as we do with failed files).
|
Could this be an issue wiith borp on windows? Looks like macos and ubuntu run without issue |
|
It's due to For some reason, it's getting split into |
|
Unfortunately, I think we are going to need to extend # .borp.yaml
reporters:
- './test/test-reporter.mjs'
files:
- 'test/**/*.test.js'
- 'test/**/*.test.mjs' |
|
I have started the work for adding rcfile support to |
|
@dancastillo bump borp to 0.18.0 and CI should pass. |
package.json
Outdated
| "coverage:ci": "tap --coverage-report=html --coverage-report=lcov --allow-incomplete-coverage", | ||
| "coverage:ci-check-coverage": "tap replay", | ||
| "coverage": "borp --reporter=./test/test-reporter.mjs --coverage --check-coverage --lines 100", | ||
| "coverage:ci": "nyc --coverage-report=html --coverage-report=lcov borp --reporter=./test/test-reporter.mjs --coverage --check-coverage", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should be using c8 for coverage.
package.json
Outdated
| "unit:report": "tap --coverage-report=html --coverage-report=cobertura | tee out.tap", | ||
| "citgm": "tap --jobs=1 --timeout=120" | ||
| "unit": "borp --reporter=./test/test-reporter.mjs", | ||
| "unit:report": "nyc --coverage-report=html --reporter=cobertura borp --reporter=./test/test-reporter.mjs --coverage --check-coverage", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nyc => c8
jsumners
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please add a .borp.yaml file with the following contents:
files:
- 'test/**/*.test.js'
- 'test/**/*.test.mjs'We are missing at least one test suite without that configuration.
package.json
Outdated
| "unit:report": "tap --coverage-report=html --coverage-report=cobertura | tee out.tap", | ||
| "citgm": "tap --jobs=1 --timeout=120" | ||
| "unit": "borp --reporter=./test/test-reporter.mjs --coverage --check-coverage", | ||
| "unit:report": "borp --reporter=./test/test-reporter.mjs --coverage > out.test-report", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is not equivalent. It should be:
| "unit:report": "borp --reporter=./test/test-reporter.mjs --coverage > out.test-report", | |
| "unit:report": "c8 --reporter html borp --reporter=./test/test-reporter.mjs", |
package.json
Outdated
| "coverage:ci": "tap --coverage-report=html --coverage-report=lcov --allow-incomplete-coverage", | ||
| "coverage:ci-check-coverage": "tap replay", | ||
| "coverage": "borp --reporter=./test/test-reporter.mjs --coverage --check-coverage --lines 100", | ||
| "coverage:ci": "borp --reporter=./test/test-reporter.mjs --coverage --check-coverage", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It should be:
| "coverage:ci": "borp --reporter=./test/test-reporter.mjs --coverage --check-coverage", | |
| "coverage:ci": "c8 --reporter lcov --reporter html borp --reporter=./test/test-reporter.mjs", |
package.json
Outdated
| "coverage": "npm run unit -- --coverage-report=html", | ||
| "coverage:ci": "tap --coverage-report=html --coverage-report=lcov --allow-incomplete-coverage", | ||
| "coverage:ci-check-coverage": "tap replay", | ||
| "coverage": "borp --reporter=./test/test-reporter.mjs --coverage --check-coverage --lines 100", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| "coverage": "borp --reporter=./test/test-reporter.mjs --coverage --check-coverage --lines 100", | |
| "coverage": "c8 --reporter html --check-coverage --100 borp --reporter=./test/test-reporter.mjs", |
jsumners
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🎉
mcollina
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm
| * Repo: https://github.com/pinojs/pino-http | ||
| * License: MIT (https://raw.githubusercontent.com/pinojs/pino-http/master/LICENSE) | ||
| */ | ||
| /* c8 ignore stop */ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm pretty sure these should not be needed
|
I'm going to merge this so work can progress. @dancastillo please determine if the c8 directives Matteo called out are actually needed and follow-up with another PR if they can be removed. |
|
This pull request has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
Checklist
This PR install
borpand addstest/test-reporter.mjsto run all tap and node:test test suites which will allow to incrementally migrate from tap to node:test.This PR is insired from this comment #5683 (comment)
npm run testandnpm run benchmarkand the Code of conduct