Skip to content

Releases: avajs/ava

0.10.0

15 Jan 06:19
Compare
Choose a tag to compare

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"]
  }
}

16c7282

Clean stack traces

Unrelated lines are now removed from stack traces, allowing you to find the source of an error much faster.

af37305

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.

614eb12

New power-assert updates reduce the size of it's dependency graph. Offering improvements to both download times and performance.

70dd2a7

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.

3d7f036

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

v0.9.1...v0.10.0

0.9.2

14 Jan 22:00
Compare
Choose a tag to compare

Work around broken Babel release. See #425.

08c3285

0.9.1

29 Dec 13:38
Compare
Choose a tag to compare

Correctly handle promises rejected with non-errors. bef1dfb

0.9.0

29 Dec 12:08
Compare
Choose a tag to compare

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.

9e6d972

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.

a5e63c0

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.

2c77314

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 and helpers. 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

v0.8.0...v0.9.0

🎄 Happy holidays from James, Vadim, and Sindre! 🎉

0.8.0

14 Dec 21:37
Compare
Choose a tag to compare

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

v0.7.0...v0.8.0

0.7.0

30 Nov 06:44
Compare
Choose a tag to compare

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();
    });
 });

387c30a 7170308

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

f816815

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

v0.6.1...v0.7.0

0.6.1

24 Nov 22:46
Compare
Choose a tag to compare

Highlights

Changes

v0.6.0...v0.6.1

0.6.0

24 Nov 09:43
Compare
Choose a tag to compare

Highlights

Changes

v0.5.0...v0.6.0

0.5.0

16 Nov 13:09
Compare
Choose a tag to compare

Highlights

Changes

v0.4.2...v0.5.0

0.4.2

08 Nov 14:48
Compare
Choose a tag to compare

Highlights

  • Fix issue with the CLI throwing on Windows. 560c6f8

Changes

v0.4.1...v0.4.2