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.19.1
->0.25.0
Release Notes
avajs/ava
v0.25.0
Compare 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/esm
in AVA's"require"
configuration and will use it to require subsequent modules72c53be
t.log()
now supports multiple arguments4f896c2
Error.stackTraceLimit
in the worker processesf00f3c4
t.snapshot(value, options)
29e5dfd
aaddc37
947f207
4a13966
bcb77fc
All changes 📚
v0.24.0...v0.25.0
Thanks 💌
💖 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
Compare 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.
37c9122
Miscellaneous 🕯
1cd3a04
37e8b49
t.is()
values are deeply equal but not the samec41b2af
f98a881
All changes 📚
v0.23.0...v0.24.0
Thanks 💌
💖 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
Compare Source
Highlights 🕴
NODE_ENV=test
✨AVA will now set
process.env.NODE_ENV
to'test'
, as long as theNODE_ENV
environment variable has not already been set.42e7c74
Improved 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
snapshotDir
option in thepackage.json
file.7fadc34
Matching anonymous tests 🕵️
--match='*'
now matches all tests, including those without a title.1df502d
Miscellaneous 🎒
1ea758f
c72f4f2
2
in CI environments3f81fc4
Bluebird.longStackTraces()
. If you're using Bluebird you may want to call this yourself using arequire
script.ebf78b3
61101d9
c9fe8db
f43d5ae
t.log()
is now supported in the Flow and TypeScript type definitions64b7755
t.title
is now supported in the TypeScript type definitions3c8b1be
t.snapshot()
now has a better Flow type definitionded7ab8
All changes 🛋
v0.22.0...v0.23.0
Thanks 💌
💖 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
Compare 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.
465fcec
You can still customize the concurrency by setting the
concurrency
option in AVA'spackage.json
configuration, or by passing the--concurrency
flag. We've also beefed up input validation on that flag.b6eef5a
Unfortunately 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--only
flag, 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 tostdout
likeconsole.log
.14f7095
Miscellaneous
d8c21a6
e28be05
t.notThrows()
example has been clarified57f5007
All changes
v0.21.0...v0.22.0
Thanks
💖 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
Compare Source
This is primarily a bug fix release, but some features did sneak in:
05bfafe
3f6e134
npm
2b4e35d
This release includes the following patches:
t.deepEqual()
and magic assert diffs9e4ee3f
Buffer
APIs that are unavailable in Node.js releases older than 4.5d0fc8c9
t.throws()
promise return value to beany
4a769f8
test()
so macros are compatible with the latestflow-bin
e794e73
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 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
Compare 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 aboutSet
order 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
Map
andSet
objects 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
Map
andSet
objects, errors, and so forth:You used to be able to compare
Arguments
object to an object literal:Instead you must now use:
(Of course you can still compare
Arguments
objects 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:Argument
objects can only be compared toArgument
objectsNote 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
.snap
extension, 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
test
folder, they’ll be placed intest/snapshots
. With__tests__
they’ll be placed in__tests__/__snapshots__
. And if you just have atest.js
in your project root the snapshot files will be written totest.js.snap
andtest.js.md
. You may have to manually remove old snapshot files after installing this new AVA version.ebd572a
Improved 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 byEnter
updates the snapshots in the tests that just ran. (And the watcher won’t rerun tests when snapshots are updated.)87eef84
dbc78dc
f507e36
50b60a1
Node.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-4
preset. We’re now also forwarding the--inspect-brk
flag for debugging purposes.e456951
a868b02
New and improved recipes
We’ve added new recipes and improved others:
1d04153
140c0e0
970872c
ff3bba9
f228401
browser-env
c01ac05
Miscellaneous
--concurrency
without a value now causes AVA to exit with an error8c35a1a
t.throws()
with a resolved promise now prints a helpful error messagedfca2d9
t.title
accessor has been documented.549e99b
All changes
v0.19.1...v0.20.0
Thanks
💖 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.
Renovate configuration
📅 Schedule: At any time (no schedule defined).
🚦 Automerge: Enabled.
♻️ Rebasing: Whenever PR becomes conflicted, or if you modify the PR title to begin with "
rebase!
".🔕 Ignore: Close this PR and you won't be reminded about this update again.
Newsflash: Renovate has joined WhiteSource, and is now free for all use. Learn more or view updated terms and privacy policies.