All Versions
37
Latest Version
Avg Release Cycle
14 days
Latest Release
1198 days ago

Changelog History
Page 1

  • v3.14.0 Changes

    December 07, 2020

    Snapshot ordering

    ๐Ÿš€ With this release, snapshot files are now ordered based on test declaration, not completion. This makes it easier to compare the human-readable reports to your test file, and also stops the .snap from changing when the reports themselves don't. You'll want to rebuild snapshots after upgrading to this release to isolate any changes. Thanks @ninevra! e66b54c

    ๐Ÿ‘ท Shared workers

    โœ… Weโ€™ve been working on making AVA more extensible. One major step on this path is our new shared worker support: run code in the main process, communicate with test workers and influence execution. Find out more in our shared workers recipe.


    ๐Ÿ‘€ See v3.13.0...v3.14.0 for all changes.

  • v3.13.0 Changes

    September 27, 2020
    • โœ… t.passed can now be used in tests and teardown functions. Thanks @tymfear! 900dc6d
    • In AVA 4, you'll no longer be able to pass null as the expectation for t.throws() & t.throwsAsync(). You can opt in to this early by enabling the disableNullExpectations experiment. Thanks @JSimoni42! f328a69
    • โšก๏ธ The Enzyme recipe has been updated. Thanks @jonathansamines! db5d2c3
    • โšก๏ธ The TypeScript recipe has been updated. Thanks @SephReed! a3379fa

    ๐Ÿ‘€ See v3.12.1...v3.13.0 for all changes.

  • v3.12.1 Changes

    August 23, 2020

    ๐Ÿ”ง Configure how AVA loads test files

    ๐Ÿ”ง Normally, AVA loads all files as CommonJS, except for mjs files and if you've configured "type": "module" in your package.json.

    As an experiment, you can now configure how AVA loads other file extensions. This is useful if you want to use Node.js' experimental loaders feature. Read more in our documentation. Thank you @macarie for working on this! 5c9dbb9

    ๐Ÿ›  Comparison bugfix

    ๐Ÿš€ There was a bug in our comparison library which meant that negative-index properties on lists were not compared. This was fixed in a patch release, which will definitely be installed when you install AVA 3.12. Your tests may have been passing, even though they should have been failing. They'll fail now. Snapshots may also be different, causing tests to fail.

    All changes

    ๐Ÿ‘€ See v3.11.1...v3.12.1 for all changes.

    Thank you @AnthumChris for making sure our ESM example used ESM syntax (20bc781).

  • v3.12.0

    August 23, 2020
  • v3.11.1 Changes

    August 03, 2020

    ๐Ÿš€ This release fixes corrupted output of the default reporter when test or program code writes to standard out. 5ddc9fd

    โœ… Also, thanks to @jonathansamines we've taken another step to using AVA to test AVA. 1150991

    ๐Ÿ‘€ See v3.11.0...v3.11.1 for all changes.

  • v3.11.0 Changes

    July 27, 2020

    ๐Ÿ†• New t.like() assertion

    Thanks to @futpib we now have a t.like() assertion 19c4f35:

    In the following example, the map property of value must be deeply equal to that of selector. However nested.qux is ignored, because it's not in selector.

    t.like({map: new Map([['foo', 'bar']]),nested: {baz: 'thud',qux: 'quux'}}, {map: new Map([['foo', 'bar']]),nested: {baz: 'thud',}})
    

    ๐Ÿ“š Read more in the t.like() assertion documentation.

    ๐Ÿš€ This assertion was previously introduced as an experiment.

    VSCode 1.47 debugging improvements

    ๐Ÿ“š You can now debug tests using the new JavaScript Debug Terminal in VSCode 1.47. We've updated our debugging recipe accordingly. Thank you @connor4312 for the documentation updates and your work on VSCode! bc39bcc

    All changes

    ๐Ÿ‘€ See v3.10.1...v3.11.0 for all changes.

  • v3.10.1 Changes

    July 05, 2020

    ๐Ÿš€ It's time for another AVA release ๐ŸŽ‰

    โšก๏ธ Restricting when you can update snapshots

    When executing a subset of tests, through --match or or .only() or .skip(), you can no longer also update snapshots. This prevents you from accidentally deleting snapshots. Thank you @bunysae for putting this together. f72fab4

    โšก๏ธ If you are skipping a test that you can't immediately fix, but you still need to update snapshots, use .failing() instead.

    ๐Ÿ‘Œ Support for message strings in t.timeout() calls

    โœ… Thanks to @jonathansamines you can now provide a message string when using t.timeout(). This can be useful if your test depends on some other setup that may not have been completed: ca8ea45

    test('foo', t =\> {t.timeout(100, 'make sure database has started');// Write your assertions here});
    

    t.try() does not work in hooks

    t.try() has never worked in hooks, but thanks to @okyantoro it now fails properly instead of crashing. d01db61

    t.snapshot() does not really work in hooks either

    t.snapshot() sort of works in hooks, but we'll be removing this in AVA 4. You can opt in to this behavior by enabling the disableSnapshotsInHooks experiment. Again thank you @okyantoro d01db61.

    ๐Ÿ›  Fixed TypeScript definition for t.like()

    ๐Ÿ‘ The experimental t.like() assertion should now work better with TypeScript.

    All changes

    ๐Ÿ‘€ See v3.9.0...v3.10.1 for all changes.

  • v3.10.0

    July 05, 2020
  • v3.9.0 Changes

    June 14, 2020

    ๐Ÿ†• New experiments!

    Thanks to @futpib we now have an experimental t.like() assertion 19c4f35:

    In the following example, the map property of value must be deeply equal to that of selector. However nested.qux is ignored, because it's not in selector.

    t.like({map: new Map([['foo', 'bar']]),nested: {baz: 'thud',qux: 'quux'}}, {map: new Map([['foo', 'bar']]),nested: {baz: 'thud',}})
    

    ๐Ÿ“š Read more in the t.like() assertion documentation and let us know what you think.

    @yjpa7145 has contributed an experiment to reverse the order in which t.teardown() functions are run, so that the last registered function is called first 952a017. This will be the behavior in AVA 4.

    โšก๏ธ To enable both these experiments update your AVA configuration:

    ๐Ÿ“ฆ package.json :

    { "ava": { "nonSemVerExperiments": { "likeAssertion": true, "reverseTeardowns": true } } }
    

    ava.config.js :

    export default {nonSemVerExperiments: {likeAssertion: true,reverseTeardowns: true}}
    

    Reporter changes

    ๐Ÿ‘€ @Michael55555 has helped us combine our reporter code into a single file b3866b6. We've also made some other tweaks and improvements baaf99a. Let us know if anything seems amiss.

    ๐Ÿ‘Œ Improved diffs

    ๐Ÿ–จ @bunysae made it so that missing or extraneous objects in diffs are printed with extra depth concordancejs/concordance#62.

    Farewell Node.js 13

    ๐Ÿšš Node.js 13 has reached end-of-life. Per our support statement we have removed it from our test matrix and supported version list.

    All changes

    ๐Ÿ“š See v3.8.2...v3.9.0 for all changes. Thank you @paulrobertlloyd and @Autre31415 for contributing documentation improvements.

  • v3.8.2 Changes

    May 08, 2020
    • ๐Ÿ›  Fix bad dependency fd92b4a
    • ๐Ÿ”ง Use configured depth limit for diffs in assertion failures, thanks @bunysae! a5385a4

    v3.8.1...v3.8.2