Releases: avajs/ava
0.10.0
Highlights
Customize the default behavior in package.json
All of the CLI options can be configured in the AVA section of your package.json. This allows you to modify the default behavior of the AVA command, so you don't have to repeatedly type the same options on the command prompt.
{
"ava": {
"files": [
"my-test-folder/*.js",
"!**/not-this-file.js"
],
"failFast": true,
"serial": true,
"tap": true,
"verbose": true,
"require": ["babel-core/register", "coffee-script/register"]
}
}
Clean stack traces
Unrelated lines are now removed from stack traces, allowing you to find the source of an error much faster.
Improved performance
Babel transpilation of test files now happens in the main process. This avoids requiring Babel in every child process and greatly improves performance. This is an especially important improvement for people still running npm@2
.
New power-assert
updates reduce the size of it's dependency graph. Offering improvements to both download times and performance.
Clean console.log
output.
The test status output and console.log
statements from within your own code will no longer interfere with each other. The test status remains fixed at the bottom of the output.
Other Changes
- New Spanish translation of the documentation. 37cd685
- Started a collection of
recipes
for common scenarios / best practices. 4d96a3e - All assertion methods now return a promise. 821436a
- Long stack traces are turned on in forked processes. da6a2f4
- Skippable assertions are now documented. 879e036
- [Breaking]
.babelrc
files will now be ignored when transpiling tests. This will be a breaking change for some, and fix major problems for others. The ability to configure test transpilation will be restored in a future update. 5f5be31 - Multiple tweaks of test reporter output. a2b282e 7b764ea
- Added a Code of Conduct b76f3d5
Changes
0.9.2
0.9.1
0.9.0
Babel 6
We were finally able to upgrade to Babel 6.
We strongly recommend using npm@3 as Babel 6 is very modular and the npm@3 default deduplication is important for performance and size reasons.
This change has no effect on what Babel version you use in your own project. We bundle our own Babel version.
TAP support
You can now get TAP output instead of our builtin reporter by using the --tap
flag.
Use any of the myriad of TAP reporters. Like the tap-nyan reporter as seen above.
This is how we'll support custom reporters in AVA. Write a TAP reporter. We're not interested in creating another silo of test runner specific reporters.
New default reporter
We built a new minimal reporter that's now the default. You can get back the old verbose reporter with the --verbose
flag.
Other
- [BREAKING] Deeply recurse directories. Previously AVA only looked for test files in the immediate subdirectory. Now it will look in subdirectories at any level. 72e87d9
- Ignore files in directories named
fixtures
andhelpers
. f6cef7f - Cache Babel transpiled code. This will improve startup performance considerably. 0daec3e
- Make
--require
relative to where the command is run. ae446f0 - Show full stack trace for non-assert errors. cbea003
- Fix promise assertions. e52db69
- French translation of the docs. Thanks to @forresst :) 8346d35
Changes
🎄 Happy holidays from James, Vadim, and Sindre! 🎉
0.8.0
Highlights
- Don't use the user local Babel when available. Instead always use the the built-in Babel. This will let you use Babel 6 in your project even though we don't yet support Babel 6. d0c370a
- Add ability to skip individual assertions with
t.skip()
. 357622c - Node.js-style
--require
CLI argument. 6081389 - Forward all test file output to
stderr
on the main process. 3f2e67a - Allow deep equality comparison of values with circular references in assertions. 56cd652
- Allow destructuring of the
t
parameter. e0f31e8 - Use
empower-core
for better assertion tracking and performance. 072ab85 - Stop hiding source of syntax errors. ad7ae19
- Add filename to failed test title. 8a67704
- Add default message to the output of
t.fail()
. da3c7a8
Changes
0.7.0
Breaking changes
There are some breaking changes in this release that significantly improves the test interface.
test()
is now only for synchronous or promise/observable returning tests
The main test()
interface is now synchronous by default and can be made asynchronous by returning a promise/observable or using a async/generator function (which implicitly returns a promise).
You no longer have to call t.end()
in synchronous tests:
test(t => {
t.pass();
- t.end();
})
You can no longer use test()
for callback-style APIs, so we've introduced a new "callback mode" test.cb()
.
-test(t => {
+test.cb(t => {
fn(err => {
t.ifError(err);
t.end();
});
});
t.plan()
will no longer auto-end tests
You will now have to explicitly end tests with callback-style APIs. Previously, t.plan()
doubled as both an assert counter and ending the test when the assertion count was reached. This was a mistake. It's now only an assert counter. We are now able to warn on too many async assertion which were previously not possible. Note that t.end()
only works in "callback mode" test.cb()
.
-test(t => {
+test.cb(t => {
t.plan(1);
fn(err => {
t.ifError(err);
+ t.end();
});
});
More info here: https://github.com/sindresorhus/ava#warning-recent-breaking-change
Highlights
- Test methods are now chainable. You can for example do
test.serial.skip()
. d874ec9 - Use the local AVA version if available when running
$ ava
from the CLI. 2f7ac92 - Guard against time manipulation by mocking modules like Sinon. b88c2ba
- Improve the behavior of the
--serial
flag. 7ad7501
Changes
0.6.1
0.6.0
Highlights
- Add
test.only()
. 93f733c - Show the first assertion failure instead of the last. eb9b339
- Add source map support. Test failures now show the correct lines & columns. 25a3cfd
- Ignore the
node_modules
folder. a4f8e24 - Fix failure stack output on Windows. 33b7918
- Happy to welcome @jamestalmage to the project! ✨ 812589a
Changes
0.5.0
Highlights
- Add
test.skip()
. 41fd96f - Add support for Observable. 05bee73 Thanks to @BarryThePenguin
- Support use of
t.end
as callback. 403a28c - Prevent using
test()
without a callback. 0dad455 - Report unhandled promise rejections. 862edb8
- Report uncaught exceptions. c5d02f1
- Handle non-test files with a user-friendly error message. a3308d2
- Display only failed hooks. 55d3613
- Fix logger throwing on files with both passing and failing tests. d6fed1c
- Lots of stability fixes! Huge thanks to @jamestalmage for tirelessly working on this.