Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow customized sorting of test files prior to execution #2968

Merged
merged 13 commits into from Mar 1, 2022
Merged

Allow customized sorting of test files prior to execution #2968

merged 13 commits into from Mar 1, 2022

Conversation

erezrokah
Copy link
Contributor

@erezrokah erezrokah commented Feb 11, 2022

Fixes #2965

Still in draft to get feedback before adding docs. Added docs.

Please note I had to disable a linting rule to allow deserialization of the comparator function.
Currently only available via a ava.config.* file, however since we treat the function as a string it is possible to add JSON and CLI argument support (though might seem a bit odd).

@erezrokah erezrokah marked this pull request as ready for review February 12, 2022 16:07
Copy link
Member

@novemberborn novemberborn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

docs/recipes/splitting-tests-ci.md Outdated Show resolved Hide resolved
docs/recipes/splitting-tests-ci.md Outdated Show resolved Hide resolved
lib/cli.js Outdated Show resolved Hide resolved
lib/cli.js Outdated Show resolved Hide resolved
erezrokah and others added 3 commits February 13, 2022 20:13
Co-authored-by: Mark Wubben <mark@novemberborn.net>
Co-authored-by: Mark Wubben <mark@novemberborn.net>
@erezrokah erezrokah changed the title feat(parallel-runs): allow custom comparator feat: allow to sort test files before executing them Feb 15, 2022
@erezrokah erezrokah changed the title feat: allow to sort test files before executing them feat: allow to sort test files Feb 15, 2022
@novemberborn
Copy link
Member

Sorry @erezrokah I haven't had a chance yet to look into this.

@erezrokah
Copy link
Contributor Author

erezrokah commented Feb 23, 2022

Let me know if I should look at the failed test. It seems to be failing on the default branch too https://github.com/avajs/ava/runs/5285903957?check_suite_focus=true

@novemberborn
Copy link
Member

@erezrokah nah, it's probably some transitive dependency that has changed and is causing the tests to fail. It won't be because of your code.

Copy link
Member

@novemberborn novemberborn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is great, thanks @erezrokah!

@novemberborn novemberborn changed the title feat: allow to sort test files Allow customized sorting of test files prior to execution Mar 1, 2022
@novemberborn novemberborn merged commit ada1a4f into avajs:main Mar 1, 2022
@erezrokah erezrokah deleted the feat/custom_comparator branch March 1, 2022 18:41
@erezrokah
Copy link
Contributor Author

This is great, thanks @erezrokah!

Thank you for the review, appreciate the feedback ❤️

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

feature: allow custom comparator for parallelRuns
2 participants