fix: migrate from tap to node test and c8#248
Conversation
28934ea to
c070d9b
Compare
c070d9b to
dc5d22e
Compare
test/bundlers.test.js
Outdated
| const fp = require('../plugin') | ||
|
|
||
| test('webpack removes require.main.filename', (t) => { | ||
| test('webpack removes require.main.filename', async (t) => { |
There was a problem hiding this comment.
Why have all of the test function been refactored to async functions?
There was a problem hiding this comment.
@jsumners Thank you for your question. You are right to notice that all test functions have been converted to async functions. While it's not strictly necessary for the migration from tap to node:test, I chose to do so due to these reasons:
- Consistency - It provides a uniform pattern across all tests.
- Future-proofing - It allows for easier integration of async operations in the future if needed.
- Minimal impact: The change doesn't negatively affect the tests' functionality or performance.
However, if the team prefers to keep the tests as close to the original implementation as possible, we can certainly revert this change and only use async functions where necessary.
There was a problem hiding this comment.
Unless there is a need for the functions to be async, please do not make them so.
916a3a6 to
72cd887
Compare
|
I agree with @jsumners . It doesnt make any sesnse and has no benefit of making functions async if there is nothing to be awaited etc.. So yes, please remove unnecesasry async. |
|
comments addressed |
457c1fd to
e2b7a88
Compare
Checklist
This PR replaces tap with node:test for testing and adds c8 for coverage.
npm run testandnpm run benchmarkand the Code of conduct