Skip to content

Conversation

@MoLow
Copy link
Member

@MoLowMoLow commented Dec 2, 2022

Fixes: #45648

image

image

TODO:

  • docs
  • tests
  • support run api?

@nodejs-github-botnodejs-github-bot added lib / src Issues and PRs related to general changes in the lib or src directory. needs-ci PRs that need a full CI run. labels Dec 2, 2022
@MoLowMoLow added the test_runner Issues and PRs related to the test runner subsystem. label Dec 2, 2022
@MoLowMoLowforce-pushed the test_runner_reporters branch 2 times, most recently from 98598f0 to d79755cCompareDecember 2, 2022 12:50
Copy link
Contributor

@cjihrigcjihrig left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Left some comments. I have some concerns about the approach here. I know this is still a WIP, but I also think we should wait to merge this until we at least have a concrete plan for multiple reporters and destinations, just so that we don't paint ourselves into a corner.

@MoLow
Copy link
MemberAuthor

MoLow commented Dec 3, 2022

. I have some concerns about the approach here.

can you elaborate? what alternative approach did you have in mind?

I know this is still a WIP, but I also think we should wait to merge this until we at least have a concrete plan for multiple reporters and destinations, just so that we don't paint ourselves into a corner.

👍🏻 I think the main challenge is a DX challenge, not a technical challenge - so lets continue the brainstorm in #45648 before merging this

@cjihrig
Copy link
Contributor

can you elaborate? what alternative approach did you have in mind?

I just meant the things that I left comments on. However, the approach here is making me rethink some things. If we aren't going to build reporters on top of the existing TAP work, then maybe we should not default to TAP everywhere and just make that the default reporter.

@MoLow
Copy link
MemberAuthor

MoLow commented Dec 3, 2022

If we aren't going to build reporters on top of the existing TAP work, then maybe we should not default to TAP everywhere and just make that the default reporter.

that is pretty much what I have suggested here, maybe I have not described it well
#43344 (comment)

@cjihrig
Copy link
Contributor

👍🏻 I think the main challenge is a DX challenge, not a technical challenge - so lets continue the brainstorm in #45648 before merging this

The more I think about this, the more I like the idea of having a CLI flag for destinations, and if you use that flag, there have to be an equal number of reporters and destinations, and reporter 1 gets paired with destination 1, and so on.

@MoLowMoLowforce-pushed the test_runner_reporters branch from 3e3218f to 3ac1e2bCompareDecember 9, 2022 12:58
@MoLow
Copy link
MemberAuthor

MoLow commented Dec 9, 2022

@cjihrig pushed another iteration implementing the discussed here,
this now supports multiple reporters,
would love some feedback

Copy link
Contributor

@cjihrigcjihrig left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Left a handful of comments. I think this is heading in a good direction though. It looks like there are some relevant CI failures as well.

yieldreportTest(data.nesting,data.testNumber,'not ok',data.name,data.directive);
yieldreportDetails(data.nesting,data.details);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we be yielding twice here? Same question for 'test:pass'.

Copy link
MemberAuthor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

just kept the same behavior as before, we sent this as two different chunks

@MoLowMoLowforce-pushed the test_runner_reporters branch 7 times, most recently from b65afb3 to c2412dfCompareDecember 11, 2022 06:59
@MoLowMoLow mentioned this pull request Dec 11, 2022
@MoLowMoLowforce-pushed the test_runner_reporters branch 2 times, most recently from e9f0ccd to eb3702dCompareDecember 16, 2022 00:35
@MoLow
Copy link
MemberAuthor

@nodejs/test_runner I think this is ready for review

const{ pathToFileURL }=require('internal/url');
const{ isAbsolute }=require('path');
constfile=isAbsolute(filePath) ? pathToFileURL(filePath).href : filePath;
returnesmLoader.import(file,undefined,ObjectCreate(null));
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
returnesmLoader.import(file,undefined,ObjectCreate(null));
returnesmLoader.import(file,undefined,{__proto__: null});

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wish we could have just 1 way to do this—I don't care which of the 3–4 I'm aware of.

Copy link
Member

@ljharbljharbDec 20, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't understand why the proto approach - undeniable syntax that doesn't require a primordial or a function call - wouldn't be preferred, but either way I agree it'd be better for the linter to enforce a single way

constinspectOptions={colors: true,breakLength: Infinity};

constcolors={
'__proto__': null,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
'__proto__': null,
__proto__: null,

this should work the same since it's not computed, but there's no need to quote it

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Using a string literal is not the same thing as using computed prop name (LiteralPropertyName : StringLiteral vs ComputedPropertyName : [ AssignmentExpression ]). I disagree with the above suggestion, I think it makes sense to keep all the keys quoted for consistency within the object. Anyway, no strong feelings so do however you like most.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There's an eslint rule for the object key quoting style, whatever style the project selects should be enforced. Certainly "consistent, but unquote if possible" is a lintable style, but the ecosystem practice is pretty overwhelmingly "only quote when necessary, consistency be damned" :-)

'test:diagnostic': blue,
};
constsymbols={
'__proto__': null,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
'__proto__': null,
__proto__: null,

MoLow added a commit to MoLow/node that referenced this pull request Jan 26, 2023
PR-URL: nodejs#45712Fixes: nodejs#45648 Reviewed-By: Antoine du Hamel <[email protected]> Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: Benjamin Gruenbaum <[email protected]>
ruyadorno pushed a commit that referenced this pull request Jan 31, 2023
Backport-PR-URL: #46361 PR-URL: #45712Fixes: #45648 Reviewed-By: Antoine du Hamel <[email protected]> Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: Benjamin Gruenbaum <[email protected]>
ruyadorno added a commit that referenced this pull request Feb 1, 2023
Notable changes: esm: * leverage loaders when resolving subsequent loaders (Maël Nison) #43772 fs: * (SEMVER-MINOR) add statfs() functions (Colin Ihrig) #46358 test_runner: * add reporters (Moshe Atlow) #45712 PR-URL: TBD
@ruyadornoruyadorno mentioned this pull request Feb 1, 2023
ruyadorno added a commit that referenced this pull request Feb 1, 2023
Notable changes: esm: * leverage loaders when resolving subsequent loaders (Maël Nison) #43772 fs: * (SEMVER-MINOR) add statfs() functions (Colin Ihrig) #46358 test_runner: * add reporters (Moshe Atlow) #45712 PR-URL: #46455
@ruyadornoruyadorno added the semver-minor PRs that contain new features and should be released in the next minor version. label Feb 1, 2023
ruyadorno added a commit that referenced this pull request Feb 1, 2023
Notable changes: buffer: * (SEMVER-MINOR) add isAscii method (Yagiz Nizipli) #46046 deps: * upgrade npm to 9.4.0 (npm team) #46353 esm: * leverage loaders when resolving subsequent loaders (Maël Nison) #43772 fs: * (SEMVER-MINOR) add statfs() functions (Colin Ihrig) #46358 src,lib: * (SEMVER-MINOR) add constrainedMemory API for process (theanarkh) #46218 test_runner: * (SEMVER-MINOR) add reporters (Moshe Atlow) #45712 v8: * (SEMVER-MINOR) support gc profile (theanarkh) #46255 vm: * (SEMVER-MINOR) expose cachedDataRejected for vm.compileFunction (Anna Henningsen) #46320 PR-URL: #46455
ruyadorno added a commit that referenced this pull request Feb 2, 2023
Notable changes: buffer: * (SEMVER-MINOR) add isAscii method (Yagiz Nizipli) #46046 deps: * upgrade npm to 9.4.0 (npm team) #46353 esm: * leverage loaders when resolving subsequent loaders (Maël Nison) #43772 fs: * (SEMVER-MINOR) add statfs() functions (Colin Ihrig) #46358 src,lib: * (SEMVER-MINOR) add constrainedMemory API for process (theanarkh) #46218 test_runner: * (SEMVER-MINOR) add reporters (Moshe Atlow) #45712 v8: * (SEMVER-MINOR) support gc profile (theanarkh) #46255 vm: * (SEMVER-MINOR) expose cachedDataRejected for vm.compileFunction (Anna Henningsen) #46320 PR-URL: #46455
MoLow added a commit to MoLow/node-core-test that referenced this pull request Feb 6, 2023
PR-URL: nodejs/node#45712Fixes: nodejs/node#45648 Reviewed-By: Antoine du Hamel <[email protected]> Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: Benjamin Gruenbaum <[email protected]> (cherry picked from commit a1b27b25bb01aadd3fd2714e4b136db11b7eb85a)
MoLow added a commit to MoLow/node-core-test that referenced this pull request Feb 7, 2023
PR-URL: nodejs/node#45712Fixes: nodejs/node#45648 Reviewed-By: Antoine du Hamel <[email protected]> Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: Benjamin Gruenbaum <[email protected]> (cherry picked from commit a1b27b25bb01aadd3fd2714e4b136db11b7eb85a)
MoLow added a commit to MoLow/node-core-test that referenced this pull request Feb 7, 2023
PR-URL: nodejs/node#45712Fixes: nodejs/node#45648 Reviewed-By: Antoine du Hamel <[email protected]> Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: Benjamin Gruenbaum <[email protected]> (cherry picked from commit a1b27b25bb01aadd3fd2714e4b136db11b7eb85a)
MoLow added a commit to MoLow/node-core-test that referenced this pull request Feb 7, 2023
PR-URL: nodejs/node#45712Fixes: nodejs/node#45648 Reviewed-By: Antoine du Hamel <[email protected]> Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: Benjamin Gruenbaum <[email protected]> (cherry picked from commit a1b27b25bb01aadd3fd2714e4b136db11b7eb85a)
MoLow added a commit to nodejs/node-core-test that referenced this pull request Feb 8, 2023
PR-URL: nodejs/node#45712Fixes: nodejs/node#45648 Reviewed-By: Antoine du Hamel <[email protected]> Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: Benjamin Gruenbaum <[email protected]> (cherry picked from commit a1b27b25bb01aadd3fd2714e4b136db11b7eb85a)
MoLow added a commit to MoLow/node that referenced this pull request Feb 25, 2023
PR-URL: nodejs#45712Fixes: nodejs#45648 Reviewed-By: Antoine du Hamel <[email protected]> Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: Benjamin Gruenbaum <[email protected]>
juanarbol pushed a commit that referenced this pull request Mar 3, 2023
PR-URL: #45712 Backport-PR-URL: #46839Fixes: #45648 Reviewed-By: Antoine du Hamel <[email protected]> Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: Benjamin Gruenbaum <[email protected]>
juanarbol added a commit that referenced this pull request Mar 3, 2023
Notable Changes: buffer: * (SEMVER-MINOR) add isAscii method (Yagiz Nizipli) #46046 doc,lib,src,test: * rename --test-coverage (Colin Ihrig) #46017 fs: * (SEMVER-MINOR) add statfs() functions (Colin Ihrig) #46358 src,lib: * (SEMVER-MINOR) add constrainedMemory API for process (theanarkh) #46218 test_runner: * add initial code coverage support (Colin Ihrig) #46017 * (SEMVER-MINOR) add reporters (Moshe Atlow) #45712 v8: * (SEMVER-MINOR) support gc profile (theanarkh) #46255 vm: * (SEMVER-MINOR) expose cachedDataRejected for vm.compileFunction (Anna Henningsen) #46320 PR-URL: #46920
@juanarboljuanarbol mentioned this pull request Mar 3, 2023
juanarbol pushed a commit that referenced this pull request Mar 5, 2023
PR-URL: #45712 Backport-PR-URL: #46839Fixes: #45648 Reviewed-By: Antoine du Hamel <[email protected]> Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: Benjamin Gruenbaum <[email protected]>
juanarbol added a commit that referenced this pull request Mar 5, 2023
Notable changes: buffer: * (SEMVER-MINOR) add isAscii method (Yagiz Nizipli) #46046 doc,lib,src,test: * rename --test-coverage (Colin Ihrig) #46017 fs: * (SEMVER-MINOR) add statfs() functions (Colin Ihrig) #46358 src,lib: * (SEMVER-MINOR) add constrainedMemory API for process (theanarkh) #46218 test_runner: * add initial code coverage support (Colin Ihrig) #46017 * (SEMVER-MINOR) add reporters (Moshe Atlow) #45712 v8: * (SEMVER-MINOR) support gc profile (theanarkh) #46255 vm: * (SEMVER-MINOR) expose cachedDataRejected for vm.compileFunction (Anna Henningsen) #46320 PR-URL: https://github.com/nodejs/node/pull/46920/commits
juanarbol added a commit that referenced this pull request Mar 5, 2023
Notable changes: buffer: * (SEMVER-MINOR) add isAscii method (Yagiz Nizipli) #46046 doc,lib,src,test: * rename --test-coverage (Colin Ihrig) #46017 fs: * (SEMVER-MINOR) add statfs() functions (Colin Ihrig) #46358 src,lib: * (SEMVER-MINOR) add constrainedMemory API for process (theanarkh) #46218 test_runner: * add initial code coverage support (Colin Ihrig) #46017 * (SEMVER-MINOR) add reporters (Moshe Atlow) #45712 v8: * (SEMVER-MINOR) support gc profile (theanarkh) #46255 vm: * (SEMVER-MINOR) expose cachedDataRejected for vm.compileFunction (Anna Henningsen) #46320 PR-URL: #46920
juanarbol added a commit that referenced this pull request Mar 5, 2023
Notable changes: buffer: * (SEMVER-MINOR) add isAscii method (Yagiz Nizipli) #46046 doc,lib,src,test: * rename --test-coverage (Colin Ihrig) #46017 fs: * (SEMVER-MINOR) add statfs() functions (Colin Ihrig) #46358 src,lib: * (SEMVER-MINOR) add constrainedMemory API for process (theanarkh) #46218 test_runner: * add initial code coverage support (Colin Ihrig) #46017 * (SEMVER-MINOR) add reporters (Moshe Atlow) #45712 v8: * (SEMVER-MINOR) support gc profile (theanarkh) #46255 vm: * (SEMVER-MINOR) expose cachedDataRejected for vm.compileFunction (Anna Henningsen) #46320 PR-URL: #46920
juanarbol added a commit that referenced this pull request Mar 7, 2023
Notable changes: buffer: * (SEMVER-MINOR) add isAscii method (Yagiz Nizipli) #46046 doc,lib,src,test: * rename --test-coverage (Colin Ihrig) #46017 fs: * (SEMVER-MINOR) add statfs() functions (Colin Ihrig) #46358 src,lib: * (SEMVER-MINOR) add constrainedMemory API for process (theanarkh) #46218 test_runner: * add initial code coverage support (Colin Ihrig) #46017 * (SEMVER-MINOR) add reporters (Moshe Atlow) #45712 v8: * (SEMVER-MINOR) support gc profile (theanarkh) #46255 vm: * (SEMVER-MINOR) expose cachedDataRejected for vm.compileFunction (Anna Henningsen) #46320 PR-URL: #46920
codebytere added a commit to electron/electron that referenced this pull request Apr 18, 2023
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

commit-queue-squashAdd this label to instruct the Commit Queue to squash all the PR commits into the first one.lib / srcIssues and PRs related to general changes in the lib or src directory.needs-ciPRs that need a full CI run.notable-changePRs with changes that should be highlighted in changelogs.semver-minorPRs that contain new features and should be released in the next minor version.test_runnerIssues and PRs related to the test runner subsystem.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Feature request: test runner reporters

11 participants

@MoLow@cjihrig@nodejs-github-bot@GeoffreyBooth@benjamingr@ljharb@aduh95@JakobJingleheimer@RafaelGSS@ruyadorno@juanarbol