Skip to content

Breaking changes to the test interface for AVA 4 #2716

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

Closed
3 tasks done
novemberborn opened this issue Mar 13, 2021 · 1 comment · Fixed by #2785
Closed
3 tasks done

Breaking changes to the test interface for AVA 4 #2716

novemberborn opened this issue Mar 13, 2021 · 1 comment · Fixed by #2785
Assignees
Labels
breaking requires a SemVer major release scope:test-interface
Milestone

Comments

@novemberborn
Copy link
Member

novemberborn commented Mar 13, 2021

See #2435. This will improve context typing and simplify usage.

  • Add test.macro(exec) and test.macro({exec, title}). This will return a test.Macro instance which can be passed to test()
  • Remove ability to pass an array of macros or implementations to test()
  • Fix the typing of test implementations (or macro executors) to allow promise-returning, observable returning and any-returning functions
@novemberborn novemberborn added breaking requires a SemVer major release scope:test-interface labels Mar 13, 2021
@novemberborn novemberborn added this to the 4.0 milestone Mar 13, 2021
@novemberborn novemberborn self-assigned this Mar 13, 2021
@novemberborn
Copy link
Member Author

  • Fix the typing of test implementations (or macro executors) to allow promise-returning, observable returning and any-returning functions

This isn't really an issue since the fallback type is void, but having the PromiseLike and Subscribable types does help if you're ever tempted to write these by hand, within the implementation…

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
breaking requires a SemVer major release scope:test-interface
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant