feat(tape-to-node-test): introduce - #296
Conversation
Co-authored-by: Bruno Rodrigues <swe@brunocroh.com>
ljharb
left a comment
There was a problem hiding this comment.
(btw the diff would read cleaner if it was "output" instead of "expected", because then "input" would be sorted before "output" instead of the reverse)
some of my comments apply on all the input/expected combos, so i'll post this now before being exhaustive
the input/expect structure isn't chose by us it's the design of the codemod tool |
Co-authored-by: Bruno Rodrigues <swe@brunocroh.com>
i have updated the comment but the user have to found a way to change their code because I dunno if we have an equivalent |
|
If there's no equivalent, then probably it doesn't make sense to provide a codemod until there is? |
IMO we should warn it on readme and people will be aware and then they know that will change how does it work. |
| console.warn( | ||
| `[Codemod] Warning: ${methodName} at ${fileName}:${line}:${column} has no direct equivalent in node:test. Please migrate manually.`, | ||
| ); |
There was a problem hiding this comment.
cc @nodejs/test_runner a onFailure (perhaps afterFail, keeping the naming similar) handler is a pretty neat feature for us to include.
Also, onFinish -> after, right?, or does after not run on the completion of the test it's created in?
There was a problem hiding this comment.
aviv can I invite you to open an issue on test runner repo
tape-to-node-test): first drafttape-to-node-test): introduce
Co-Authored-By: Aviv Keller <me@aviv.sh>
Co-Authored-By: Aviv Keller <me@aviv.sh>
Co-Authored-By: Bruno Rodrigues <swe@brunocroh.com>
|
fwiw i still don't think this is a responsible codemod to exist unless it can cover 100% of the features of the thing it's codemodding away from. |
|
I concur with @ljharb The reasons why one uses tape are the opposite of why one would use node:test. Both totally valid. |
|
agree with you. let's take an example, if you have a small js package that have typescript, tsx, tape as dep. just with one codemod you can remove one dep. and with So imo we can land this but improve the docs about "Why and when you should use it " |
Related issue
Close #260