ava v2.0.0-beta.1 Release Notes

Release Date: 2019-04-29 // almost 5 years ago
  • ๐Ÿ’ฅ Breaking changes

    AVA now requires at least Node.js 8.9.4

    ๐Ÿš€ Per the Node.js release schedule, the 6.x releases reach end of live on April 30th. Consequently we've removed support in AVA. We are now testing with Node.js 12 though. 3a4afc6

    โœ… Test file and helper selection

    We've been working on simplifying how test files and helpers are selected. First off, the files option now only accepts glob patterns. If you configured it with directories before, please add /**/* to get the previous behavior.

    ๐Ÿ”ง The files and sources options must now be arrays containing at least one pattern. It's no longer possible to override a default exclusion pattern, but we're looking at making these configurable separately.

    ๐Ÿš€ AVA used to treat all files inside a helpers directory as test helpers. Finding these files could be really slow, however, and it also meant you couldn't have tests inside a helpers directory. Instead we're going to let you specify glob patterns to find these helpers. That work hasn't landed yet. For now, if you have such helpers we'd advise to not upgrade to this release.

    โœ… Test files starting with an underscore are still recognized as helpers.

    โœ… Files inside fixtures directories are no longer ignored, and will now be treated as test files. The watcher now also watches ava.config.js files.

    The CLI now only takes file paths, not glob patterns.

    โšก๏ธ We'd like some help updating our ESLint plugin as well.

    Snapshots in CI

    โšก๏ธ When you run tests locally and add a new snapshot, AVA automatically updates the .snap file. However if you forget to commit this file and then run your CI tests, they won't fail because AVA quietly updates the .snap file, just like it does locally.

    ๐Ÿš€ With this release, AVA will fail the t.snapshot() assertion if it is run in CI and no snapshot could be found. 0804107

    Assertion messages must be strings

    ๐Ÿ‘€ AVA now enforces assertion messages to be strings. The message is only used when the assertion fails, and non-string values may cause AVA to crash. You may see test failures if you were accidentally passing a non-string message. 49120aa

    Flow type definitions

    ๐Ÿšš We've decided to remove the Flow type definitions from AVA itself. We don't have anybody to maintain them and consequently they've become a blocker when adding features to AVA. c633cf0

    We've set up a new repository from which we'll publish the definitions, but we need your help setting it up. If you use AVA and Flow, please join us in avajs/flow-typed#1.

    Other changes

    • We've added UntitledMacro and UntitledCbMacro types, for macro functions that will never have a .title function. Though really this just helped simplify the type definition. Thanks @qlonik! ebf4807

    All changes

    v1.4.1...v2.0.0-beta.1

    Get involved

    We welcome new contributors. AVA is a friendly place to get started in open source. We have a great article on getting started contributing and a comprehensive contributing guide.