-
-
Notifications
You must be signed in to change notification settings - Fork 9
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
Update tsconfig.json
, use node:test
#21
Conversation
fermium probably? |
Good idea! Updated CI to fermium |
Codecov ReportBase: 100.00% // Head: 100.00% // No change to project coverage 👍
📣 This organization is not using Codecov’s GitHub App Integration. We recommend you install it so Codecov can continue to function properly for your repositories. Learn more Additional details and impacted files@@ Coverage Diff @@
## main #21 +/- ##
=========================================
Coverage 100.00% 100.00%
=========================================
Files 1 1
Lines 21 21
=========================================
Hits 21 21 Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. ☔ View full report at Codecov. |
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 not sure I want to do majors of rehype plugins etc now.
I’ve gotten all the hast utilities in shape, but I’m still expecting a month or two of work to get all the micromark/mdast stuff in order, so that we can do one big major run through the ecosystem.
Looking at react-markdown
and skipLibCheck
, there seem to be tons of other errors (also in esbuild), so if dropping skipLibCheck
is the goal, I don’t think just this PR will get it there.
PR otherwise looks great!
Sounds good! 👍
Yep, it is a broader goal/ideal. |
Could you drop the |
Sure, walked back in 038f8be |
test.js
Outdated
@@ -35,9 +34,9 @@ test('rehypeRaw', (t) => { | |||
'</div>' | |||
].join('\n'), | |||
(error, file) => { |
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 the execution order now:
- the test runs
- The unified processor is started
- The test succeeds
- The unified processor calls a callback
- Assertions are made
Previously tape
could use the t
context to determine how many assertions were expected, and wait for those. This is no longer the case.
IMO the cleanest solution is to either:
- use the unified promise API, and async / await syntax for this test.
- use the unified sync API.
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 don't think it has been reordered in that way.
I tried adding assert.fail()
inside the callback to see if it would wait long enough for it to fail.
It does fail.
I'm open to making it async if that would be more clear for folks.
But I don't think the change is required for the tests to function.
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 think Remco here is correct, due to plan
. That makes tape run async and wait until there are two assertions.
I think what’s happening now is just uncaught exceptions (because assert
throws errors, tape doesn’t). While it “works” (because uncaught exceptions still fail the process), I don’t think that’s a good idea?
So I believe your assert.fail
causes an uncaught exception?
I like using async/await now :)
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.
Updated in fc02c20
missing eol somewhere? |
fc02c20
to
e30f01d
Compare
tsconfig.json
, use node:test
Thanks! |
Initial checklist
Description of changes
Upgradeshast-util-raw
.The latest version ofhast-util-raw
includes types fixes which would helpreact-markdown
which currently needsskipLibCheck
to ignore the typing issue.Upgrades typescript to use node16 resolution for better ESM support.
Replaces tape with node:test and node:assert