ava v1.4.1 Release Notes

Release Date: 2019-03-24 // about 5 years ago
  • Focusing power-assert

    AVA comes with power-assert built-in, giving you more descriptive assertion messages. However it's been confusing to understand which assertions come with power-assert. To address this we've added the new t.assert() assertion. It's now the only assertion that is power-assert enabled. The assertion passes if called with a truthy value. Consider this example:

    test('enhanced assertions', t =\> { const a = /foo/; const b = 'bar'; const c = 'baz'; t.assert(a.test(b) || b === c); });
    

    AVA will output: 6: const c = 'baz'; ✅ 7: t.assert(a.test(b) || b === c); 8: }); Value is not truthy: false ✅ a.test(b) || b === c => false b === c => false c => 'baz' b => 'bar' ✅ a.test(b) => false b => 'bar' a => /foo/

    ⚡️ Our ESLint plugin has been updated to support this new assertion. Many thanks to @eemed for implementing this! 9406470

    Watch mode

    🖨 Watch mode now prints the available commands. Thanks @KompKK! cd256ac

    🐛 Bug fixes

    • ✅ Filtered tests (when using --match, .skip() or .only()) are no longer included in the list of pending tests when timeouts occur or when you interrupt a test run. Thanks @vancouverwill! 23e302a
    • 👷 We're now shimming all TTY methods in the worker processes, thanks to @okyantoro. c1f6fdf

    📚 Documentation updates

    • ✅ We've added a note to say that, by default, AVA does not have a default test timeout. Thanks @amokmen! 99a10a1

    All changes

    v1.3.1...v1.4.1

    Thanks

    Thank you @eemed, @KompKK, @vancouverwill, @okyantoro and @amokmen. We couldn't have done this without you!

    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.