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>
|
@ljharb i had resolved all of your concerns |
ljharb
left a comment
There was a problem hiding this comment.
There's a big issue with converting to assert - namely, that tape test suites very intentionally do not terminate at a failed assertion, but node's assert throws (which prevents running the rest of the assertions).
Does the test runner have a non-throwing assertion API?
| const opts = { skip: false }; | ||
|
|
||
| test('timeout with variable opts', opts, async (t) => { | ||
| // TODO: Add timeout: `123` to test options manually; |
There was a problem hiding this comment.
does the test runner not have an imperative timeout API?
There was a problem hiding this comment.
I didn't found it
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>
Related issue
Close #260