Skip to content

test: refactor structure of common/index - #22511

Closed
jasnell wants to merge 1 commit into
nodejs:masterfrom
jasnell:test-refactor-index
Closed

test: refactor structure of common/index#22511
jasnell wants to merge 1 commit into
nodejs:masterfrom
jasnell:test-refactor-index

Conversation

@jasnell

Copy link
Copy Markdown
Member

Further work on restructuring common/index.js. This updates to the module.exports = {} structure so that it's easier to see what exactly is being exported. Part of an ongoing effort to incrementally de-monolith-ize the thing.

Checklist
  • make -j4 test (UNIX), or vcbuild test (Windows) passes
  • tests and/or benchmarks are included
  • commit message follows commit guidelines

@nodejs-github-bot

Copy link
Copy Markdown
Collaborator

@nodejs-github-botnodejs-github-bot added the test Issues and PRs related to the tests. label Aug 24, 2018
@jasnell

Copy link
Copy Markdown
MemberAuthor

@Trott

Copy link
Copy Markdown
Member

@nodejs/testing

Comment threadtest/common/index.js Outdated

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Nit: s/exports/this/

Comment threadtest/common/index.js Outdated

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Suggestion, use IIFE:

constPIPE=(()=>{constlocalRelative=path.relative(process.cwd(),`${tmpdir.path}/`);constpipePrefix=isWindows ? '\\\\.\\pipe\\' : localRelative;constpipeName=`node-test.${process.pid}.sock`;returnpath.join(pipePrefix,pipeName);})()

@refackrefack left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

😍

@refack

Copy link
Copy Markdown
Contributor

+10 for readability, and style conformance.

@jasnelljasnell added the author ready PRs that have at least one approval, no pending requests for changes, and a CI started. label Aug 27, 2018
@jasnell
jasnellforce-pushed the test-refactor-index branch from 3c7b47f to a38522dCompareAugust 27, 2018 21:15
@addaleaxaddaleax removed the author ready PRs that have at least one approval, no pending requests for changes, and a CI started. label Aug 27, 2018
@addaleax

Copy link
Copy Markdown
Member

@jasnell This needs a rebase, sorry :/

@BridgeAR

Copy link
Copy Markdown
Member

Ping @jasnell

@jasnell

Copy link
Copy Markdown
MemberAuthor

Haven't forgotten. I've just been moving ;-) ... will be finishing this up today.

@jasnell

Copy link
Copy Markdown
MemberAuthor

@BridgeARBridgeAR added the author ready PRs that have at least one approval, no pending requests for changes, and a CI started. label Sep 5, 2018
@jasnelljasnell assigned andrasq and unassigned andrasqSep 5, 2018
jasnell added a commit that referenced this pull request Sep 5, 2018
PR-URL: #22511
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Refael Ackermann <refack@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
@jasnell

Copy link
Copy Markdown
MemberAuthor

Landed in 286ca2c

@jasnelljasnell closed this Sep 5, 2018
targos pushed a commit that referenced this pull request Sep 12, 2018
PR-URL: #22511
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Refael Ackermann <refack@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
@targostargos mentioned this pull request Sep 18, 2018
targos pushed a commit that referenced this pull request Sep 19, 2018
PR-URL: #22511
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Refael Ackermann <refack@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
targos pushed a commit that referenced this pull request Sep 20, 2018
PR-URL: #22511
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Refael Ackermann <refack@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

author readyPRs that have at least one approval, no pending requests for changes, and a CI started.testIssues and PRs related to the tests.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

8 participants

@jasnell@nodejs-github-bot@Trott@refack@addaleax@BridgeAR@lpinca@andrasq