Skip to content

Unit tests in node.js repository #5115

Closed as not planned
Closed as not planned

Description

@Ghostblad3

Node.js Version

latest

NPM Version

any

Operating System

any

Subsystem

Other

Description

Hello, I am doing a presentation on unit tests and why they are important, and I would like to know if someone who is involved in the development of node.js knows the exact or an approximate number of unit tests in the node.js repository. After searching I figure out there are a lot of type of tests and variations and also languages used in node.js repository but it is not easy to figure out how many exist. At least for someone who is not involved in the development.

I am not interested only on the ECMAScript unit tests number inside the repository. I am interested in all languages used. Also I am not interested in a specific platform. As for version the latest available. If someone could provide a number for each language it would be also be very helpful. Thanks a lot.

Minimal Reproduction

No response

Output

No response

Before You Submit

  • I have looked for issues that already exist before submitting this
  • My issue follows the guidelines in the README file, and follows the 'How to ask a good question' guide at https://stackoverflow.com/help/how-to-ask

Activity

  1. avivkeller commented on Oct 30, 2025

    @avivkeller
    Member

    Just count the files in the test directory

  2. Ghostblad3 commented on Oct 30, 2025

    @Ghostblad3
    Author

    Hello, I am referring to test scenarios. Not files.

  3. ljharb commented on Oct 30, 2025

    @ljharb
    SponsorMember

    What about a "test scenario" is precisely defined enough that it's a useful metric?

  4. avivkeller commented on Oct 30, 2025

    @avivkeller
    Member

    Each file can be considered a "scenario", or, if you want each part of each file, run make test and see how many tests are ran

  5. Ghostblad3 commented on Nov 1, 2025

    @Ghostblad3
    Author

    Will that print something like: "X tests scenarios were successfully executed" (X an arbitrary natural number) or I will be here asking for further help? Maybe it is possible to see that in the pipelines?

  6. ljharb commented on Nov 4, 2025

    @ljharb
    SponsorMember

    A file can contain multiple tests, or one. A test can contain multiple tests, or one. A folder can contain multiple tests, or one.

    I'm not seeing any objective boundary here that's even remotely countable.

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

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions