Update dependency ava to ^0.25.0#6
Open
ghost wants to merge 1 commit into
Open
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR contains the following updates:
^0.16.0->^0.25.0Release Notes
avajs/ava (ava)
v0.25.0: 0.25.0Compare Source
Another small release while we're gearing up for a 1.0 built with Babel 7. This is likely to be the last
0.release, but we may go through a few beta releases for 1.0 whilst we wait for Babel 7 to get out of beta itself.@std/esmin AVA's"require"configuration and will use it to require subsequent modules72c53bet.log()now supports multiple arguments4f896c2Error.stackTraceLimitin the worker processesf00f3c4t.snapshot(value, options)29e5dfdaaddc37947f2074a13966bcb77fcAll changes 📚
v0.24.0...v0.25.0Thanks 💌
💖 Huge thanks to @ppatel221, @cdaringe, @jy95, @jamestalmage, @okyantoro, @ajafff, @niftylettuce, @kugtong33, @troysandal, @willnode and @forresst for helping us with this release. We couldn’t have done it 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.
v0.24.0: 0.24.0Compare Source
Highlights 💡
This is a pretty small release, but a great one if you're solely developing for Node.js 8.3 or above.
You can now use object rest/spread properties in test files without any further Babel configuration. Note that if you're running tests on older versions of Node.js you'll still need to add the relevant Babel plugins, since this new language feature has not yet reached stage 4.
37c9122Miscellaneous 🕯
1cd3a0437e8b49t.is()values are deeply equal but not the samec41b2aff98a881All changes 📚
v0.23.0...v0.24.0Thanks 💌
💖 Huge thanks to @jedmao, @Lifeuser, @mightyiam, @ahmadawais and @codeslikejaggars for helping us with this release. We couldn’t have done it 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.
v0.23.0: 0.23.0Compare Source
Highlights 🕴
NODE_ENV=test✨AVA will now set
process.env.NODE_ENVto'test', as long as theNODE_ENVenvironment variable has not already been set.42e7c74Improved snapshot storage location 🗃
Snapshots are stored alongside your test files. This is great when your test file is executed directly but say if you're using TypeScript to precompile your test file AVA would store the snapshots in your build directory. In this release, if source maps are available, AVA determines the original test file location and uses that to store the snapshots.
You can also specify where snapshots are stored through the
snapshotDiroption in thepackage.jsonfile.7fadc34Matching anonymous tests 🕵️
--match='*'now matches all tests, including those without a title.1df502dMiscellaneous 🎒
1ea758fc72f4f22in CI environments3f81fc4Bluebird.longStackTraces(). If you're using Bluebird you may want to call this yourself using arequirescript.ebf78b361101d9c9fe8dbf43d5aet.log()is now supported in the Flow and TypeScript type definitions64b7755t.titleis now supported in the TypeScript type definitions3c8b1bet.snapshot()now has a better Flow type definitionded7ab8All changes 🛋
v0.22.0...v0.23.0Thanks 💌
💖 Huge thanks to @anshulwadhawan, @mliou8, @dehbmarques, @forivall, @forresst, @Couto, @impaler, @kristianmandrup, @lukechilds, @neoeno, @jugglinmike, @P-Seebauer, @philippotto, @ptim, @rhendric, @ntwb, @tdeschryver, @timothyjellison and @zellwk for helping us with this release. We couldn’t have done it 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.
v0.22.0: 0.22.0Compare Source
There's but a few commits in this release, but we've made a big change to how AVA manages its test workers 👩🏼🔬👨🏼🏭👨🏿🚀👨🏻⚕️👩🏽💼.
Highlights
Default concurrency
We now cap the number of concurrent workers to the number of CPU cores on your machine. Previously AVA started workers for each test file, so if you had many test files this could actually bring things to a halt.
465fcecYou can still customize the concurrency by setting the
concurrencyoption in AVA'spackage.jsonconfiguration, or by passing the--concurrencyflag. We've also beefed up input validation on that flag.b6eef5aUnfortunately this does change how
test.only()behaves. AVA can no longer guarantee that normal tests won't run. For now, if you want to usetest.only(), you should run tests from just that file. We have an open issue to add an--onlyflag, which will ensure that AVA runs just thetest.only()tests. If you'd like to help us with that please head on over to #1472.t.log()We've also added
t.log(), which lets you print a log message contextually alongside the test result, instead of immediately printing it tostdoutlikeconsole.log.14f7095Miscellaneous
d8c21a6e28be05t.notThrows()example has been clarified57f5007All changes
v0.21.0...v0.22.0Thanks
💖 Huge thanks to @abouthiroppy, @ydaniv, @nowells, @melisoner2006, @clayzermk1 and @tdeschryver for helping us with this release. We couldn’t have done it 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.
v0.21.0: 0.21.0Compare Source
This is primarily a bug fix release, but some features did sneak in:
05bfafe3f6e134npm2b4e35dThis release includes the following patches:
t.deepEqual()and magic assert diffs9e4ee3fBufferAPIs that are unavailable in Node.js releases older than 4.5d0fc8c9t.throws()promise return value to beany4a769f8test()so macros are compatible with the latestflow-bine794e73Thanks
💖 Huge thanks to @wprater, @HippoDippo, @roperzh, @ArtemGovorov, @dancoates, @suchmaske, @ajtorres9 and @guillaumevincent for helping us with this release. We couldn’t have done it 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.
v0.20.0: 0.20.0Compare Source
Today’s release is very exciting. After adding magic assert and snapshot testing we found that these features sometimes disagreed with each other.
t.deepEqual()would returnfalse, yet AVA wouldn’t show a diff. Snapshot tests cared aboutSetorder butt.deepEqual()didn’t. @novemberborn came to the realization that comparing and diffing object trees, and doing so over time with snapshots, are variations on the same problem. Thus he started ConcordanceJS, a new project that lets you compare, format, diff and serialize any JavaScript value. This AVA release reaps the fruits of his labor.Highlights
More magical asserts
Magic assert will now always show the difference between actual and expected values. If an unexpected error occurs it’ll print all (enumerable) properties of the error which can make it easier to debug your program.
More details of an object are printed, like the constructor name and the string tag. Buffers are hex-encoded with line breaks so they’re easy to read:
t.deepEqual()improvementst.deepEqual()andt.notDeepEqual()now useconcordance, rather thanlodash.isequal. This changes what values AVA considers to be equal, making thet.deepEqual()assertion more predictable. You can now trust that all aspects of your objects are compared.Object wrappers are no longer equal. The following assertion will now fail:
For
MapandSetobjects to be equal, their elements must now be in the same order:With this release AVA will compare all enumerable properties of an object. For an array this means that the comparison considers not just the array elements. The following are no longer considered equal:
The same goes for
MapandSetobjects, errors, and so forth:You used to be able to compare
Argumentsobject to an object literal:Instead you must now use:
(Of course you can still compare
Argumentsobjects to each other.)New in this release is the ability to compare React elements:
Snapshot improvements
Snapshots too now use
concordance. This means values are compared with the snapshot according to the same rules ast.deepEqual(), albeit with some minor differences:Argumentobjects can only be compared toArgumentobjectsNote that Node.js versions before 6.5 cannot infer names of all functions . AVA will pass a snapshot assertion if it determines the name information is unreliable.
AVA now saves two files when snapshotting. One, ending in the
.snapextension, contains a compressed serialization of the expected value. The other is a readable Markdown file that contains the snapshot report. You should commit both to source control. The report file can be used to see what is in your snapshots and to compare snapshot changes over time.Try it out with our snapshot example! Or check out an example snapshot report.
The snapshot file location now follows your test layout. If you use a
testfolder, they’ll be placed intest/snapshots. With__tests__they’ll be placed in__tests__/__snapshots__. And if you just have atest.jsin your project root the snapshot files will be written totest.js.snapandtest.js.md. You may have to manually remove old snapshot files after installing this new AVA version.ebd572aImproved snapshot support in watch mode
In watch mode, AVA now watches for changes to snapshot files. This is handy when you revert changes while the watcher is running. Snapshot files are correctly tracked as test dependencies, so the right tests are rerun. Typing
u, followed byEnterupdates the snapshots in the tests that just ran. (And the watcher won’t rerun tests when snapshots are updated.)87eef84dbc78dcf507e3650b60a1Node.js 8 support
AVA 0.19 already worked great with Node.js 8, and we’ve made it even better by removing unnecessary Babel transpilations in our
stage-4preset. We’re now also forwarding the--inspect-brkflag for debugging purposes.e456951a868b02New and improved recipes
We’ve added new recipes and improved others:
1d04153140c0e0970872cff3bba9f228401browser-envc01ac05Miscellaneous
--concurrencywithout a value now causes AVA to exit with an error8c35a1at.throws()with a resolved promise now prints a helpful error messagedfca2d9t.titleaccessor has been documented.549e99bAll changes
v0.19.1...v0.20.0Thanks
💖 Huge thanks to @lukechilds, @alexrussell, @zs-zs, @cncolder, @JPeer264, @CImrie, @blake-newman, @yatharthk, @bfred-it, @tdeschryver, @sudo-suhas, @dohomi, @efegurkan and @forresst for helping us with this release. We couldn’t have done it 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.
v0.19.1: 0.19.1Compare Source
A bugfix release. See
0.19.0for full release notes.MaxListenersExceededWarningfrom being emitted if a test file contains more than 10 testsd27bc8ft.end()not being available in the TypeScript definition for callback testsbd81ef4t.contextnot being available in the Flow definition forbeforeEach()andafterEach()hooksd169f0ev0.19.0: 0.19.0Compare Source
Since our last minor release, @novemberborn has worked tirelessly on refactoring big parts of the codebase to be more correct and readable, while squashing many bugs. We've also added multiple detections that will prevent user mistakes.
Highlights
Working snapshots
We released snapshot support with
v0.18.0, but unfortunately it didn’t work. That’s fixed now. Since we’re usingjest-snapshotthe output will look a little different from AVA’s other assertions. Most notably the output will not be colored.57fd051Tests fail if no assertions are run (BREAKING)
Sometimes you write a test that accidentally passes, because your assertion was never run. For example, the following test passes if
getAnimals()returns an empty array:AVA now fails your test if no assertions were run. This can be a problem if you use third-party assertion libraries, since AVA cannot detect when those assertions pass. You can disable this behavior by setting the
failWithoutAssertionsoption tofalsein AVA'spackage.jsonconfiguration.3a4553cImproved
t.throws()andt.notThrows()assertions (BREAKING)Various improvements have been made to these assertions. Unfortunately this does include some breaking changes.
Calling these assertions with an observable or promise makes them asynchronous. You now need to
awaitthem:Previously, these would return a promise that was rejected if the assertion failed. This leaked AVA’s internal assertion error. Now they’ll fulfill their returned promise with
undefinedinstead (d56db75). You typically won’t notice this in your test.We’ve improved how we detect when
t.throws()andt.notThrows()are used incorrectly (d924045). This might be when, rather than passing a function, you call it:You can now use
awaitandyieldin the argument expressions (e.g.t.throws(await createThrowingFunction()). The instructions on how to use these assertions correctly are now shown with the test failure, instead of being written to the console as your tests run.Incorrectly using these assertions now always causes your test to fail.
Stack traces are now correct, even if used asynchronously (
f6a42ba). The error messages have been improved for whent.throws()fails to encounter an error, or ift.notThrows()does (4463f38). Ift.notThrows()fails, the encountered error is shown (22c93ed).Improved magic assert output
Actual and/or expected values are now included in the magic assert output, with helpful labels that are relevant to the failing assertion.
4f87f32Detect hanging tests
AVA can now detect when an asynchronous test is hanging (
880e87e).Note that this may not work if your code is listening on a socket or is using a timer or interval.
Better Babel option resolution
We’re now resolving Babel options ahead of time, using
hullabaloo-config-manager. This fixes long-standing issues with relative paths in AVA’s"babel"options inpackage.jsonfiles (#707). It also means we’re better at recompiling test and helper files if your Babel config changes or you update plugins or presets.0464b14Miscellaneous
a49f66b50ad2139f2ff09bd5ed60b581983157ef2532793360510d80t.regex()andt.notRegex()are now validated.f062981All changes
v0.18.2…v0.19.0Thanks
💖 Huge thanks to @Wp1987, @lukechilds, @jakwuh, @danny-andrews, @mmkal, @yatharthk, @klauscfhq, @screendriver, @jhnns, @danez and @florianb for helping us with this release. We couldn’t have done it 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.
v0.18.2: 0.18.2Compare Source
Many bug fixes for snapshot testing, magic assert, and the type definitions: avajs/ava@v0.18.1...v0.18.2
v0.18.1: 0.18.1Compare Source
Quick bug fix: Remove
t.isandt.notfrom enhanced assertion patterns to provide correct output on assertion failure.v0.18.0: 0.18.0Compare Source
This release is one of the biggest, most feature-packed release we’ve had in a long time. We have prepared lots of tasty things for you - snapshot testing, magic assert, precompiling test helpers, improvements to Babel transpilation, and more. Our team and contributors have been working hard to deliver all this goodness. We can’t wait to hear your feedback and don’t hesitate to suggest new ideas and report bugs!
Highlights
Dropped support for Node.js 0.10 and 0.12
As mentioned in the 0.17.0 release notes, we’re dropping support for Node.js 0.10 and 0.12 in this release. They’re both out of maintenance mode. Time to upgrade!
Magic assert
We completely overhauled the error output to make it as easy and fast as possible to detect the source of the failure. Magic assert, as we call it internally, adds code excerpts and clean diffs for actual and expected values. If values in the assertion are objects or arrays, only a difference is displayed to remove the noise and focus on the problem. Oh, and the diff is syntax-highlighted too! If you are comparing strings, both single and multi line, AVA displays a different kind of output, highlighting the added or missing characters. Last but not least, you don’t have to update any of your tests to take advantage of this! Third-party assertion libraries, like expect, chai and others, are supported out-of-the-box as well.
c9e6e6fSnapshot testing
We now have snapshot testing, thanks to @lithin ✨
Snapshot testing simply saves a stringified state of some data structure and compares it on the next run. It was popularized with React component testing, but you can use it with anything that can be stringified. For example, ensuring API responses stay the same.
ee65b6dPrecompile helper files
Previously, AVA transpiled your test files, but not your test helpers. Now we transpile helper files too! Helpers are files starting with
_or any files in ahelpersdirectory inside the test directory. These are usually used for utilities and shared logic between test files.410cb8dImproving language support
We’ve come up with a specification for how AVA handles Babel projects and may better support other languages like TypeScript. Customizing transpilation of test and helper files will be easier, and AVA will start transpiling source files too. We’ve started work on this, but there are no user-facing changes yet.
076eb81Miscellaneous
t.ok,t.notOk,t.same,t.notSame). If you haven’t migrated yet, you can do so automagically with our codemod.c010fd7--sourceflag. Use the package.json config instead.34bebc4033d4dcbabel-runtime. Built-ins likeMapandPromiseare no longer replaced with polyfills.ad5122dtest.only()is used, so you don’t mistakenly think you’re running all the tests.22a6081--fail-fastis enabled, so you’re aware AVA didn’t run all your tests.09d23f5--watchis used in CI, as otherwise the process would never exit, since watch mode is persistent.0606ff75158ac8ce42fcb314f7a00603edcAll changes
Thanks
💖 Huge thanks to @lithin, @ThomasBem, @leebyron, @rnkdev, @sebald, @gconaty, @jarlehansen, @LasaleFamine, @asafigan, for helping us with this release. We couldn’t have done it 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.
v0.17.0: 0.17.0Compare Source
The current working directory in test files changed (BREAKING)
We made the hard decision of changing the current working directory (
process.cwd()) in test files to be the same directory aspackage.json. It was previously the same as__dirname(the directory of the test file). Havingprocess.cwd()equal__dirnamefelt like a good idea at the time, but as the popularity of AVA grew, people started hitting issues with it.This affects users that have test files in a sub-folder and are using relative paths. If you have your test files in the same directory as
package.json, you're fine.The fix is to wrap all relative paths in
path.join(__dirname, 'relative-path')to make them absolute.Here's an example of what needs changing. The below file and
unicorn.txtare both in./test/.Let us know if anything is unclear or if you're having problems.
Commit:
476c653Node.js version support
The next minor version of AVA, 0.18.0, will drop support for Node.js v0.10 and v0.12. We'll continue fixing critical issues for this version until the end of the year. Time to upgrade if you haven't. (Discussion: #1051)
Highlights
7cfdf34a443d7a4025d81--requireCLI flag. Configure it in package.json instead.17119bclodash.isEqualfor deep equality checking (t.deepEqual()&t.notDeepEqual()). This might make your test fail if our previous deep equality check was too loose.8856684e4f90e0(We're currently working on many more improvements in this area. Stay tuned.)power-assert.24a38ac26bcab0t.doesNotThrow()as it was renamed tot.notThrows(). It was deprecated far back in AVA 0.12.0.e448798t.error()alias fort.ifError(). It will be removed in AVA 1.0.0. Just uset.ifError().28bb0d5(We have an automatic migration script if you're usingt.error())3ea2ba1c268c8d64584544baa1708816fafc40477a204f2beAll Changes
Configuration
📅 Schedule: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).
🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.
♻ Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.
🔕 Ignore: Close this PR and you won't be reminded about this update again.