-
Notifications
You must be signed in to change notification settings - Fork 0
Update ava to the latest version 🚀 #64
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Codecov Report
@@ Coverage Diff @@
## master #64 +/- ##
=====================================
Coverage 100% 100%
=====================================
Files 9 9
Lines 76 76
=====================================
Hits 76 76Continue to review full report at Codecov.
|
Version 0.21.0 just got published.Update to this version instead 🚀 Release Notes0.21.0This is primarily a bug fix release, but some features did sneak in:
This release includes the following patches:
Thanks💖 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 involvedWe 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. CommitsThe new version differs by 17 commits.
There are 17 commits in total. See the full diff |
Version 0.22.0 just got published.Update to this version instead 🚀 Release Notes0.22.0There's but a few commits in this release, but we've made a big change to how AVA manages its test workers 👩🏼🔬👨🏼🏭👨🏿🚀👨🏻⚕️👩🏽💼. HighlightsDefault concurrencyWe 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. 465fcec You can still customize the concurrency by setting the Unfortunately this does change how
|
Version 0.20.0 of ava just got published.
The version 0.20.0 is not covered by your current version range.
Without accepting this pull request your project will work just like it did before. There might be a bunch of new features, fixes and perf improvements that the maintainers worked on for you though.
I recommend you look into these changes and try to get onto the latest version of ava.
Given that you have a decent test suite, a passing build is a strong indicator that you can take advantage of these changes by merging the proposed change into your project. Otherwise this branch is a great starting point for you to work on the update.
Release Notes
0.20.0Today’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.) 87eef84 dbc78dc f507e36 50b60a1Node.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. e456951 a868b02New and improved recipes
We’ve added new recipes and improved others:
browser-envc01ac05Miscellaneous
--concurrencywithout a value now causes AVA to exit with an error 8c35a1at.throws()with a resolved promise now prints a helpful error message dfca2d9t.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.
Commits
The new version differs by 63 commits.
854203a0.20.0652705bAdd more screenshot fixtures9d3b1baDeep update of XO and its dependencies8d09ba5Link to ava-snapshot-example2360256Redo all of the screenshots589489dMeta tweaksf507e36Add command for updating snapshots in watch mode (#1413)87eef84Automatically watch for snapshot changesa141033concordance@2f62c137Update readme0e82f8fAdd integration test for appending to an existing snapshot fileebd572aDetermine snapshot directory by where the test is locateddbc78dcTreat loaded snapshot files as test dependencies50b60a1Track snapshot files touched during test run, ignore in watcher6d3c279Include dirty sources in watcher debug outputThere are 63 commits in total.
See the full diff
Not sure how things should work exactly?
There is a collection of frequently asked questions and of course you may always ask my humans.
Your Greenkeeper Bot 🌴