Skip to content

test: More descriptive name for test file names  #19592

Description

@dsinecos
  • Version: master
  • Platform: 16.04.1, Ubuntu
  • Subsystem: test

I was going through the following test files test-process-geteuid-getegid.js and test-process-setuid-setgid.js

I was wondering if the filenames could include the name of all the methods that are being tested so

  • test-process-geteuid-getegid.js could be renamed to test-process-geteuid-getegid-seteuid-setegid.js
  • And test-process-setuid-setgid.js could be renamed to test-process-getuid-getgid-setuid-setgid.js

I had a little confusion when locating these files and I thought maybe this change would help. Also, I read the guidelines on naming test files and it allows for listing the methods being tested and additional information where needed.

There are test files with over 60 characters eg. test-timers-socket-timeout-removes-other-socket-unref-timer.js, test-process-exception-capture-should-abort-on-uncaught-setflagsfromstring.js so I understand the renaming would not violate any character limit restrictions on test file names

If the above change isn't possible I was thinking for the sake of consistency, the test files could be renamed to test-process-getuid-getgid.js and test-process-getegid-geteuid.js. I was initially confused for a bit when I found the test-process-geteuid-getegid.js but not a corresponding test-process-getuid-getgid.js

Activity

  1. tniessen commented on Mar 25, 2018

    @tniessen
    Member

    Even though there is no hard limit for the file name length, it is usually a good idea to keep them as short as reasonably possible. How about test-process-euid-egid.js and test-process-uid-gid.js?

  2. dsinecos commented on Mar 25, 2018

    @dsinecos
    ContributorAuthor

    @tniessen That makes sense, this way it keeps the file names concise and also indicates what kind of methods the file tests for

  3. added
    testIssues and PRs related to Node.js core tests and test infrastructure.
    good first issueIssues that are suitable for first-time contributors.
    on Apr 2, 2018
  4. rajdhandus commented on Apr 2, 2018

    @rajdhandus
    Contributor

    @dsinecos @tniessen @lpinca - I would like to take this up.. Can i please work on this issue?

  5. lpinca commented on Apr 2, 2018

    @lpinca
    Member
  6. rajdhandus commented on Apr 2, 2018

    @rajdhandus
    Contributor

    thanks..

  7. added a commit that references this issue on Apr 12, 2018
  8. added a commit that references this issue on Jul 27, 2026
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

    good first issueIssues that are suitable for first-time contributors.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