Conversation
|
Review requested:
|
8c96ecf to
dc38eb4
Compare
|
@MoLow Can you add an eslint rule to inhibit requiring/using |
| .replaceAll(/[0-9.]+ms/g, '*ms') | ||
| .replaceAll(/duration_ms [0-9.]+/g, 'duration_ms *'); | ||
| .replaceAll(/duration_ms [0-9.]+/g, 'duration_ms *') | ||
| .replace(new RegExp(`(\\u001b\\[\\d+m)\\(${process.cwd()}/?(\\u001b\\[\\d+m)(.*)(\\u001b\\[\\d+m)\\)`, 'g'), '$3'); |
There was a problem hiding this comment.
Can you add a comment to this line and explain what it does?
| .transform(snapshot.replaceWindowsLineEndings, snapshot.replaceStackTrace, replaceTestDuration); | ||
| const specTransform = snapshot | ||
| .transform(snapshot.replaceWindowsLineEndings, snapshot.replaceStackTrace, replaceSpecDuration); | ||
| .transform(replaceSpecDuration, snapshot.replaceWindowsLineEndings, snapshot.replaceStackTrace); |
There was a problem hiding this comment.
Why did we have to change the ordering of this transform? Would it be helpful to document this with a comment?
|
To avoid confusion with actual |
I think that is relevant for deps, not for tools, see #47793 (comment) |
tniessen
left a comment
There was a problem hiding this comment.
Could you explain what problem node-pty solves here, and how it worked before?
| @@ -53,9 +82,11 @@ async function assertSnapshot(actual, filename = process.argv[1]) { | |||
| * @param {function(string): string} [transform] | |||
| * @returns {Promise<void>} | |||
There was a problem hiding this comment.
why? it still returns Promise<void>
There was a problem hiding this comment.
Huh, either GitHub or myself messed up the reference. I meant to select the entire doc comment, not just the @returns line. Specifically, shouldn't a @param be added?
Sure. the current node/test/pseudo-tty/pty_helper.py Line 3 in d225d95 as part of the effort of migrating the message tests to use common.assertSnapshot this will allow running as any other test under tests/parallel.
|
|
@nodejs/node-api any idea why the build is failing on mac? https://github.com/nodejs/node/actions/runs/4846084398/jobs/8635397424 |
|
|
closing in favor of #47803, wich is much simpler |
this is another followup for #47498 enabling running pseudo-tty snapshot tests using https://github.com/microsoft/node-pty
see #47793 (comment) for the reasoning behind this change