Skip to content

More benchmarks for the node:test module. #55723

Open
@avivkeller

Description

@avivkeller

The benchmark/test_runner folder currently contains benchmarks for it and describe functions. I suggest we expand these benchmarks to cover additional test runner features, including mocks, coverage, and various test modes.

Here are the functions that (IMO) should be benchmarked:

Basic Testing

These tests should run with a custom reporter without any special logic to make the tests as accurate as possible.

Hooks

  • beforeEach
  • afterEach
  • before
  • after

Reporters (#55757)

  • dot
  • junit
  • spec
  • tap
  • lcov

Mocking

Snapshots

  • snapshot.setDefaultSnapshotSerializers(serializers)
  • snapshot.setResolveSnapshotPath(fn)
  • t.assert.snapshot

Coverage

Use --expose-internals to exclusively test the coverage part

  • Basic
  • Excluding files
  • Including files
  • With source maps

Metadata

Metadata

Assignees

No one assigned

    Labels

    benchmarkIssues and PRs related to the benchmark subsystem.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