Skip to content

Add a proccess module to the common library #22303

Description

@conectado

Describe the solution you'd like
I've been reading the Testing for internet and I've seen the function killChildren repeatedly defined over many files, such as test/internet/test-dgram-multicast-set-interface-lo.js and test/internet/test-dgram-broadcast-multi-process.js, and other similar patterns

Describe alternatives you've considered
I was wondering if it was a good idea to add a process module inside the common library so to not repeat code inside the tests. Otherwise we could add a Utils library.

Thanks!

Activity

  1. Trott commented on Aug 14, 2018

    @Trott
    Member

    Tests are the one place where it doesn't always make sense to keep could DRY. (See https://stackoverflow.com/q/6453235/436641 for example.) And this function is tiny. Abstracting it out does not gain us much. It appears in three tests.

    I wouldn't stop it if someone wanted to do it, but I wouldn't bother.

  2. Trott commented on Aug 14, 2018

    @Trott
    Member

    (Actually, I probably would stop it. The test common module is a monolith that needs fewer things in it, not more.)

  3. added
    testIssues and PRs related to Node.js core tests and test infrastructure.
    on Aug 14, 2018
  4. conectado commented on Aug 14, 2018

    @conectado
    ContributorAuthor

    Makes sense, I will close the issue. Thanks again!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    testIssues and PRs related to Node.js core tests and test infrastructure.

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions