-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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: implement additional test cases for the node test reporter #5669
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
|
b21179a
to
19a5c52
Compare
6d49cd4
to
8102129
Compare
74267d9
to
5e3adaa
Compare
e56bad2
to
7435f0c
Compare
cc35be6
to
9d758de
Compare
9d758de
to
4cee340
Compare
I scheduled sync time with @alcuadrado this week to discuss the follow-up questions that came to me during the course of preparation of this PR. I don't believe any of them should be blocking for this PR through. |
I think, ideally, we include them, but also in some rendered format. I've tried a few solutions and this seems to be the best option: sudo apt install aha wkhtmltoimage
cat result.txt | aha --black > result.html
wkhtmltoimage --format svg result.html result.svg There are some node.js solutions, but they pull puppeteer, which don't seem to work on devcontainer on apple silicon. |
Great work, @galargh! I have some comments/questions related the tests and the behavior that we want to achieve in the reporter:
See the note about the test, though. Also, we may need a way to customize the message that tells the user to run with
|
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.
Looking good. Let's dicuss it in our call tomorrow.
…r-tests Render the node-test-reporter integration test results as SVG
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.
As we discussed in our call, let's merge this and implement any improvements to the reporter in follow-up PRs.
re the missing test cases: if you want to add them here that's also fine, but may a follow up PR would be easier to review.
That makes sense, thank you for the approve. I'm going to merge it as-is and propose the other work items we discussed in follow-up PRs. |
This PR is part of the initiative to enhance our custom reporter - #5437
This PR modifies the reporter's test runner in the following ways:
--test-only
flag (e.g. runningpnpm test:integration --test-only example-project
would only run the tests for theexample-project
fixture)--show-output
,--test-only
,--color
,--no-color
are accepted)X
sX:X
sThis PR also adds the following test cases:
before
,beforeEach
,after
,afterEach
,describe
)test.only
test.todo
Follow-up Questions
test.only
tests to be executed by default?node --import tsx/esm --test --test-reporter=./dist/src/reporter.js only-test/*.ts --color
produces https://github.com/NomicFoundation/hardhat/blob/4cee3401010b74189afd878e05f4e07b6263c458/v-next/hardhat-node-test-reporter/integration-tests/fixture-tests/only-test/result.txt with the test case inside thetest.only
block executed.after
(3)
)/describe
(11)
) block?after
, we end up with2
added to thefailing
count (expected) and an additional1
added to thefailing
count to account for theafter
block failing. In case ofdescribe
, it's2
added to thecancelled
as expected and additional 1 added to thefailing
count.