Skip to content

Test Runner is slow #47663

Closed
Closed
@egoroof

Description

@egoroof

Version

18.16.0 same with 20.0.0

Platform

Ubuntu 22.04.2 and Windows 11

Subsystem

test_runner

What steps will reproduce the bug?

Run some simple tests with Nodejs Test Runner. For example:

git clone https://github.com/egoroof/browser-id3-writer.git
cd browser-id3-writer
npm ci
npm run build
node --test --test-reporter spec test/

How often does it reproduce? Is there a required condition?

always

What is the expected behavior? Why is that the expected behavior?

I expect native test runner to run at least as Mocha speed or even faster.

What do you see instead?

duration_ms 1977 when on same tests Mocha runs in 38ms (50x faster, yeah)

Additional information

I also tested it on nodejs 20.0.0 and got same results. Same on Windows 11 and Ubuntu 22.04.2

I was happy to drop Mocha as a dependency, but was not expect to such a slow down.

You can see the switch from Mocha to native Test Runner in this commit egoroof/browser-id3-writer@6d29a06

Metadata

Metadata

Assignees

No one assigned

    Labels

    performanceIssues and PRs related to the performance of Node.js.test_runnerIssues and PRs related to the test runner subsystem.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions