Skip to content

0.14.0

Compare
Choose a tag to compare
@jamestalmage jamestalmage released this 07 Apr 01:59
· 1346 commits to main since this release

The biggest change in this release is the deprecation of t.ok, t.notOk, t.same, and t.notSame assertions. We have published a codemod (automatic migration script) which should make switching to the new assertion methods very easy.

Also, we've added a --timeout flag that will stop test execution after a certain period of inactivity.

Highlights

  • A number of assertion methods have been renamed for clarity. The old methods still exist, but have been deprecated, and will be removed in a future release (e9c6cc2, a7f50eb). We have published ava-codemods to assist in automatically renaming these assertions in your tests.
    • t.ok()t.truthy()
    • t.notOk()t.falsy()
    • t.same()t.deepEqual()
    • t.notSame()t.notDeepEqual()
  • Added an idle timeout option to prevent test runs from hanging indefinitely. The test run is considered timed out when no test results have been received for the specified interval. d1a3669
  • Published a recipe on various ways to configure Babel. bcda753
  • Updated Russian, Chinese, and Spanish translations. Big thanks to our translation team!

Of Note

  • t.deepEqual() (formerly t.same()) no longer compares constructors. a7826cf
  • Truncate test titles in the mini reporter. 6d5f322
  • Fix t.throws() not returning error for synchronous methods. 26d2291
  • Now throws a meaningful error if --require dependency is not found. c78e736
  • Watch mode will now rerun all .only tests regardless of dependency graph. e57908a
  • Print the planned and actual assertion count when there is a plan failure. 07febb2
  • Workaround for Node.js bug which could kill main process. cd6961a
  • Mini reporter no longer flashes test titles for skip/todo tests. ecc87cb
  • Display a helpful error message for invalid Babel config. febbaa2
  • Switch from serialize-error to clean-yaml-object (better compatibility with node-tap). cd5767e
  • Rewrite require("babel-runtime") in tests to absolute path (allows module resolution for npm@2 without modifying NODE_PATHS). 382e50d
  • Ensure source maps can be resolved from cached code. 592ff13
  • Produces a helpful failure method when users incorrectly provide an implementation method to test.todo(). 8d6490a

All Changes

v0.13.0...v0.14.0

Shout-out to @kentcdodds @sotojuan @SamVerschueren @mattkrick for their awesome contributions to this release! ✨🎉