Skip to content

feature: allow custom comparator for parallelRuns #2965

@erezrokah

Description

@erezrokah

Please provide details about:

  • What you're trying to do

    Follow up to RFC: Parallelizing across machines in CI #1811. Better load balance test files across multiple CI machines

  • Why you can't use AVA for this

    Ava sorts files by file name, which is not the best load balancing strategy, especially when some tests are slower than others.

  • And maybe how you think AVA could handle this

    Allow setting a custom comparator to be used here:

    ava/lib/api.js

    Line 180 in 3131ccd

    selectedFiles = selectedFiles.sort((a, b) => a.localeCompare(b, [], {numeric: true}));

Alternatives:
Ensure number of tests per file is low enough via a lint rule.

More context:
netlify/cli#4178

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions