Skip to content
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

Update ava to the latest version 🚀 #6

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

greenkeeper[bot]
Copy link

@greenkeeper greenkeeper bot commented Jun 28, 2017

Version 0.20.0 of ava just got published.

Dependency ava
Current Version 0.19.1
Type devDependency

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.0

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 return false, yet AVA wouldn’t show a diff. Snapshot tests cared about Set order but t.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.

Example of a formatted exception

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:

Example of diffed Buffers

t.deepEqual() improvements

t.deepEqual() and t.notDeepEqual() now use concordance, rather than lodash.isequal. This changes what values AVA considers to be equal, making the t.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:

t.deepEqual(Object(1), 1); // fails

For Map and Set objects to be equal, their elements must now be in the same order:

const actual = new Set(['hello', 'world']);
t.deepEqual(actual, new Set(['hello', 'world'])); // passes
t.deepEqual(actual, new Set(['world', 'hello']) // fails

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:

const actual = [1, 2, 3];
const expected = [1, 2, 3];
expected.also = 'a property';
t.deepEqual(actual, expected); // fails

The same goes for Map and Set objects, errors, and so forth:

const actual = new TypeError('Bad value');
const expected = new TypeError('Bad value');
expected.value = 41;
t.deepEqual(actual, expected); // fails

You used to be able to compare Arguments object to an object literal:

const args = (function() { return arguments; })('hello', 'world');
t.deepEqual(args, {0: 'hello', 1: 'world'}); // now fails

Instead you must now use:

const args = (function() { return arguments; })('hello', 'world');
t.deepEqual(args, ['hello', 'world']); // passes

(Of course you can still compare Arguments objects to each other.)

New in this release is the ability to compare React elements:

t.deepEqual(<HelloWorld/>, <HelloWorld/>);

const renderer = require('react-test-renderer');
t.deepEqual(renderer.create(<HelloWorld/>).toJSON(), <h1>Hello World</h1>);

Snapshot improvements

Snapshots too now use concordance. This means values are compared with the snapshot according to the same rules as t.deepEqual(), albeit with some minor differences:

  • Argument objects can only be compared to Argument objects
  • Functions are compared by name and other enumerable properties
  • Promises are compared by their constructor and additional enumerable properties
  • Symbols are compared by their string serialization. Registered and well-known symbols will never equal symbols with similar descriptions

Note 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 in test/snapshots. With __tests__ they’ll be placed in __tests__/__snapshots__. And if you just have a test.js in your project root the snapshot files will be written to test.js.snap and test.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 by Enter 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:

Miscellaneous

  • Specifying --concurrency without a value now causes AVA to exit with an error 8c35a1a
  • Using t.throws() with a resolved promise now prints a helpful error message dfca2d9
  • The 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.

Commits

The new version differs by 63 commits.

  • 854203a 0.20.0
  • 652705b Add more screenshot fixtures
  • 9d3b1ba Deep update of XO and its dependencies
  • 8d09ba5 Link to ava-snapshot-example
  • 2360256 Redo all of the screenshots
  • 589489d Meta tweaks
  • f507e36 Add command for updating snapshots in watch mode (#1413)
  • 87eef84 Automatically watch for snapshot changes
  • a141033 concordance@2
  • f62c137 Update readme
  • 0e82f8f Add integration test for appending to an existing snapshot file
  • ebd572a Determine snapshot directory by where the test is located
  • dbc78dc Treat loaded snapshot files as test dependencies
  • 50b60a1 Track snapshot files touched during test run, ignore in watcher
  • 6d3c279 Include dirty sources in watcher debug output

There 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 🌴

greenkeeper bot added a commit that referenced this pull request Jul 13, 2017
@greenkeeper
Copy link
Author

greenkeeper bot commented Jul 13, 2017

Version 0.21.0 just got published.

Update to this version instead 🚀

Release Notes 0.21.0

This is primarily a bug fix release, but some features did sneak in:

  • Additional arguments can be passed when profiling 05bfafe
  • Though not officially supported, AVA now works better with Wallaby.js’ diff view 3f6e134
  • Expanded the Webstorm recipe to include setup instructions using npm 2b4e35d

This release includes the following patches:

  • Fixes for t.deepEqual() and magic assert diffs 9e4ee3f
  • Ensure AVA doesn’t use Buffer APIs that are unavailable in Node.js releases older than 4.5 d0fc8c9
  • Changed Flow typing of the t.throws() promise return value to be any 4a769f8
  • Update Flow typing of test() so macros are compatible with the latest flow-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.

Commits

The new version differs by 17 commits.

  • a1afbe3 0.21.0
  • f9b865a Update safe-buffer in package-lock.json
  • d0fc8c9 Avoid directly using newish Buffer APIs (#1448)
  • 9e4ee3f Upgrade concordance (#1450)
  • 761f7f7 Update expected package.json version in readme (#1449)
  • e794e73 Resolve strict checking of function call arity (#1441)
  • 1cbcb06 Revert "Handle package-lock.json churn"
  • 8d981bf Handle package-lock.json churn
  • c09462c Assume npm 5.2.0 during development and CI
  • 2b4e35d Add an additional npm-based recipe for Jetbrains IDEs (#1444)
  • 4a769f8 Update flow def for AssertContext.throws to match typescript def (#1443)
  • 3f6e134 Include raw actual and expected objects in AssertionError (#1432)
  • 0069a7e Remove non-existent npm run script in maintaining.md (#1434)
  • e58e96e Minor readme tweak (#1422)
  • 5ae434a Bump dependencies

There are 17 commits in total.

See the full diff

greenkeeper bot added a commit that referenced this pull request Aug 15, 2017
@greenkeeper
Copy link
Author

greenkeeper bot commented Aug 15, 2017

Version 0.22.0 just got published.

Update to this version instead 🚀

Release Notes 0.22.0

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's package.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 use test.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 the test.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 to stdout like console.log. 14f7095

Miscellaneous

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.

Commits

The new version differs by 10 commits.

  • dd9e8b2 0.22.0
  • b6eef5a Fail hard when --concurrency is set to invalid values (#1478)
  • 57f5007 Fix typo in t.notThrows example (#1486)
  • d8c21a6 Update debugging with webstorm recipe (#1483)
  • 14f7095 Implement t.log() (#1452)
  • e28be05 Fixed makeApp() in endpoint testing recipe (#1479)
  • 465fcec Limit concurrency to the number of CPU cores (#1467)
  • 4eea226 Use --verbose when testing CLI output (#1477)
  • a0d5b37 Simplify readme avatar URLs
  • 31b1380 Add tests for improper-usage-messages (#1462)

See the full diff

greenkeeper bot added a commit that referenced this pull request Oct 24, 2017
@greenkeeper
Copy link
Author

greenkeeper bot commented Oct 24, 2017

Version 0.23.0 just got published.

Update to this version instead 🚀

Release Notes 0.23.0

Highlights 🕴

NODE_ENV=test

AVA will now set process.env.NODE_ENV to 'test', as long as the NODE_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 snapshotLocation option in the package.json file. 7fadc34

Matching anonymous tests 🕵️

--match='*' now matches all tests, including those without a title. 1df502d

Miscellaneous 🎒

  • The verbose logger now only displays the timestamp when in watch mode 1ea758f
  • Anonymous functions are now included in stack traces c72f4f2
  • Concurrency is now capped at 2 in CI environments 3f81fc4
  • AVA no longer calls Bluebird.longStackTraces(). If you're using Bluebird you may want to call this yourself using a require script. ebf78b3 61101d9
  • There's a new recipe for endpoint testing using Mongoose c9fe8db
  • The browser testing recipe has been updated with an example of exposing global variables, such as jQuery f43d5ae
  • t.log() is now supported in the Flow and TypeScript type definitions 64b7755
  • t.title is now supported in the TypeScript type definitions 3c8b1be
  • t.snapshot() now has a better Flow type definition ded7ab8

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.

Commits

The new version differs by 30 commits.

  • 3b81e2c 0.23.0
  • 3f81fc4 Limit concurrency to 2 in a CI environment
  • 1cb9d4f Adjust NODE_PATH test to fix linting issue
  • 1ea758f Only display timestamp in verbose logger if watch mode is active (#1557)
  • c72f4f2 Include anonymous functions in stacktraces (#1508)
  • eebf26e Add Awesome mentioned badge
  • f43d5ae Recipe instructions for making jQuery available in browser (#1543)
  • 68ce4b8 Update tsconfig.json docs link in the TS recipe
  • 837b0dd Fix TypeScript recipe typo (#1549)
  • 2349316 Update package-lock with changes in #1407
  • bb91862 Version warning when local version is behind (#1407)
  • 42e7c74 Set NODE_ENV to to 'test' if not already set (#1523)
  • 64b7755 Add t.log() for Flow and TypeScript (#1538)
  • 8955e15 Lint test fixtures
  • fa4f73c Update to npm@5.4.2

There are 30 commits in total.

See the full diff

greenkeeper bot added a commit that referenced this pull request Nov 27, 2017
@greenkeeper
Copy link
Author

greenkeeper bot commented Nov 27, 2017

Version 0.24.0 just got published.

Update to this version instead 🚀

Release Notes 0.24.0

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 🕯

  • Before and after hooks are no longer run when all tests are skipped 1cd3a04
  • Improved output of assertion statements when tests fail 37e8b49
  • Improved feedback when t.is() values are deeply equal but not the same c41b2af
  • Updated the Typescript with an example of how to title macros 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.

Commits

The new version differs by 12 commits.

  • e401bd1 0.24.0
  • 8141395 Churn and dedupe package-lock
  • f2979a3 Bump dependencies
  • efc3b31 Code style tweaks
  • cb1c3f7 Fix documentation of snapshotDir option
  • c41b2af Provide feedback when t.is() values are deeply equal but not the same
  • 1cd3a04 Don't run before and after hooks when all tests are skipped
  • f98a881 Document how to title macros when using TypeScript
  • b3c4090 Fix broken link in contributing guide
  • 37c9122 Include syntax-object-rest-spread in default Babel options for Node.js >= 8.3.0
  • 035fd31 Verify package-lock when linting
  • 37e8b49 Use babel-generator to regenerate enhanced assertion statements

See the full diff

greenkeeper bot added a commit that referenced this pull request Jan 26, 2018
@greenkeeper
Copy link
Author

greenkeeper bot commented Jan 26, 2018

Version 0.25.0 just got published.

Update to this version instead 🚀

Commits

The new version differs by 15 commits.

  • a051d3e 0.25.0
  • 4f896c2 Make t.log() behave more like console.log()
  • f00f3c4 Don't set Error.stackTraceLimit in worker processes
  • c2b42ec Mention #1319 as a pitfall
  • bcb77fc Recommend skipFiles for VSCode debugging
  • cd8c91b Add more clarification for different Babel config in .babelrc.md (#1642)
  • 947f207 Update code-excerpt to ^2.1.1
  • 4a13966 Debug serially in the "Debugging tests with VS Code" recipe (#1634)
  • aaddc37 Use absolute source map paths in precompiled files
  • 72c53be support @std/esm (#1618)
  • 29e5dfd Add TS types for t.snapshot(content, options)
  • c1faf95 Fix typo in precompiling-with-webpack.md (#1625)
  • 4e8f827 Switch time-require to @ladjs/time-require
  • 965cbc6 Use supertap to generate TAP output (#1610)
  • 4124d77 Update npm, test Node.js 9, detect package-lock churn in CI (#1601)

See the full diff

greenkeeper bot added a commit that referenced this pull request Dec 15, 2018
@greenkeeper
Copy link
Author

greenkeeper bot commented Dec 15, 2018

  • The devDependency ava was updated from 0.19.1 to 1.0.1.

Update to this version instead 🚀

Release Notes for 1.0

AVA 1.0 🚀

Back in January we started work on the 1.0 release, taking the opportunity to upgrade to Babel 7 and follow its beta releases. It's been a year where we made massive improvements to AVA. It's also been a year with many exciting events in our personal lives. Be it honeymoons & weddings, work & friends, naturalizations and international relocations.

So, we're done. Or, rather, we're just beginning. Testing can be a drag. AVA helps you get it done. Its concise API, detailed error output, embrace of new language features and process isolation let you write tests more effectively. So you can ship more awesome code or do non-programming things.

Starting now we'll push out patches and new features more regularly. And, when the time comes, ship a 2.0 and a 3.0 and so forth. If you like what we're doing, why not try and contribute? We're a friendly bunch and we could use your help to make AVA even better.

We couldn't have gotten here without the nearly one hundred people who've contributed more, and the many more who suggested improvements, reported bugs and provided feedback. And, of course, everyone who's used AVA. Thank you for your enthusiasm and support.

Mark & Sindre

What's new & improved

Assertions

New t.throws() behavior & t.throwsAsync()

We've rewritten t.throws() so it behaves better, has better error output and lets you write better tests:

  • The assertion takes a first thrower argument. It must throw an exception, or your test fails. Throwing other values like strings also causes your test to fail.
  • The exception must be an error object.
  • The assertion returns the exception.

You have a few ways of asserting that the exception is as designed. You can pass a second argument:

  • If you pass a function it should be a constructor: the exception must be an instance of it. Previously you could pass a validation function. This is no longer possible.
  • If you pass a string: the exception's message should be equal to it.
  • If you pass a regular expression: the exception's message should match it.

The most exciting new feature though is that you can pass an expectation object. A combination of the following expectations is supported:

t.throws(fn, {code: 'ENOTFOUND'}) // err.code === 'ENOTFOUND'
t.throws(fn, {code: 9}) // err.code === 9
t.throws(fn, {instanceOf: SyntaxError}) // err instanceof SyntaxError
t.throws(fn, {is: expectedErrorInstance}) // err === expectedErrorInstance
t.throws(fn, {message: 'expected error message'}) // err.message === 'expected error message'
t.throws(fn, {message: /expected error message/}) // /expected error message/.test(err.message)
t.throws(fn, {name: 'SyntaxError'}) // err.name === 'SyntaxError'

This makes tests like these much easier to write:

// Old assertion
const err = t.throws(fn, TypeError)
t.is(err.message, 'Expected a string')

// New assertion
t.throws(fn, {
instanceOf: TypeError,
message: 'Expected a string'
})

We've removed promise support from t.throws() and t.notThrows(). Use the new t.throwsAsync() and t.notThrowsAsync() assertions instead. Support for observables has been removed completey.

The original behavior was both hard to explain and hard to express in Flow and TypeScript. Now, if you have a function that throws a synchronous error, use t.throws() (or t.notThrows()). If you have a promise that should reject, or an asynchronous function that should fail, use await t.throwsAsync() (or await t.notThrowsAsync()).

Generally speaking, you should be able to replace every occurence of await t.throws with await t.throwsAsync, and await t.notThrows with await t.notThrowsAsync. A transform file for jscodeshift is available in this Gist. Run it like:

$ npx jscodeshift -t https://gist.githubusercontent.com/novemberborn/c2cdc94020083a1cafe3f41e8276f983/raw/eaa64c55dfcda8006fc760054055372bb3109d1c/transform.js test.js

Change test.js to a glob pattern that matches your test files. See the jscodeshift CLI usage documentation for further details.

Bound assertion methods

Assertion methods are now bound to the test, meaning you can provide them as direct arguments to other functions. A contrived example:

const assertEach = (arr, assert) => {
  arr.forEach(value => assert(value));
};

test('all are true', t => {
assertEach(getArray(), t.true);
});

Whilst not strictly assertions, t.plan() and t.log() are now also bound to the test.

BigInt

As part of our Node.js 10 support you can now use BigInt values in t.deepEqual() and t.snapshot(). Note that this is still a stage-3 proposal.

Babel 7

AVA now uses Babel 7, with support for babel.config.js files. We'll automatically use your project's Babel configuration. Babel options must now be specified in a testOptions object. This will allow us to add source related options in the future.

Our @ava/stage-4 preset is now accessible via ava/stage-4. We've added transforms for the latest ES2018 features where available (and even an ES2019 one!). You can also disable ava/stage-4 entirely:

package.json:

{
  "ava": {
    "babel": {
      "testOptions": {
        "presets": [
          ["ava/stage-4", false]
        ]
    }
    }
  }
}

Or, you can disable just ES module compilation:

package.json:

{
  "ava": {
    "babel": {
      "testOptions": {
        "presets": [
          ["ava/stage-4", {"modules": false}]
        ]
      }
    }
  }
}

The powerAssert option and command line flags have been removed. You can now disable AVA's test enhancements by setting compileEnhancements to false. You can also disable AVA's Babel pipeline entirely:

package.json:

{
  "ava": {
    "babel": false,
    "compileEnhancements": false
  }
}

Serial hooks and context

Hooks declared using test.serial will now execute serially. Only one of those hooks will run at a time. Other hooks run concurrently. Hooks still run in their declaration order.

Note that concurrent tests run concurrently. This means that .beforeEach() and .afterEach() hooks for those tests may also run concurrently, even if you use test.serial to declare them.

t.context can now be used in .before and .after hooks.

CLI

Pass flags to your test

AVA now forwards arguments, provided after an -- argument terminator, to the worker processes. Arguments are available from process.argv[2] onwards.

npx ava test.js -- hello world

There's a new recipe on how to use this.

Previously AVA populated process.argv[2] and process.argv[3] with some undocumented internal values. These are no longer available.

Resetting AVA's cache

The --no-cache CLI flag has been replaced by a --reset-cache command. The latter resets AVA's regular cache location. You can still disable the cache through the cache configuration option.

npx ava --reset-cache

Configuration

Introducing ava.config.js

You can now configure AVA through an ava.config.js file. It must be placed next to the package.json, and you mustn't have any "ava" options in the package.json file. Export the configuration as a default:

export default {
    babel: {
        extensions: ['js', 'jsx']
    }
};

Or export a factory function:

export default ({projectDir}) => ({
    babel: {
        extensions: ['js', 'jsx']
    }    
});

Following our convention to use ES modules in test files, we're expecting ES modules to be used in the configuration file. If this is causing difficulties please let us know in #1820.

Configurable test & helper file extensions

You can now tell AVA to run test files with extensions other than js! For files that should be compiled using Babel you can specify babel.extensions:

package.json:

{
  "ava": {
    "babel": {
      "extensions": ["js", "jsx"]
    }
  }
}

Or define generic extensions, e.g. for use with TypeScript:

package.json:

{
  "ava": {
    "compileEnhancements": false,
    "extensions": ["ts"],
    "require": [
      "ts-node/register"
    ]
  }
}

Note that AVA still assumes test & helper files to be valid JavaScript. They're still precompiled to enable some AVA-specific enhancements. You can disable this behavior by specifying "compileEnhancements": false.

Snapshots

Adding new snapshots no longer causes the Markdown files to become malformed. Snapshots are now consistent across operating systems. If you've previously generated snapshots on Windows, you should update them using this release.

We now support BigInt and <React.Fragment> in t.snapshot(). We've also improved support for the Symbol.asyncIterator well-known symbol. Unfortunately these changes are not backwards compatible. You'll need to update your snapshots when upgrading to this release.

We've improved how AVA builds snapshot files to better support precompiled projects. Say, if you compile your TypeScript test files using tsc before running AVA on the build output. AVA will now use the source map to figure out the original filename and use that as the basis for the snapshot files. You'll have to manually remove snapshots generated by previous AVA versions.

Type definitions

The TypeScript and Flow definitions have been rewritten and much improved. The TypeScript recipe has been updated to reflect the changes, and there's a new Flow recipe too.

TypeScript

AVA recognizes TypeScript build errors when using ts-node/register.

TypeScript now type-checks additional arguments used by macros. You must type the arguments used:

import test, {Macro} from 'ava'

const failsToParse: Macro<[Buffer]> = (t, input) => {
t.throws(parse(input))
}

failsToParse.title = (providedTitle = 'unexpected input') => </span>throws when parsing ${<span class="pl-smi">providedTitle</span>}<span class="pl-pds">

test('malformed', failsToParse, fs.readFileSync('fixtures/malformed.txt'))
test(failsToParse, '}') // ⬅️ fails to compile

Other improvements

  • You can now specify helpers — that need to be compiled by AVA — in the require configuration.
  • --fail-fast behavior has been improved. AVA now makes sure not to start new tests. Tests that are already running though will finish. Hooks will also be called. AVA now prints the number of skipped test files if an error occurs and --fail-fast is enabled.
  • AVA now uses its own Chalk instance, so AVA's color settings no longer impact the code you're testing.
  • Error serialization has been made smarter, especially if non-Error errors are encountered.
  • Uncaught exceptions and unhandled rejections are now shown with a code excerpt.
  • You should see fewer repeated test timeout messages.
  • Error messages now link to the documentation appropriate for the version of AVA you're using.
  • AVA now automatically detects whether your CI environment supports parallel builds. Each build will run a subset of all test files, while still making sure all tests get executed. See the ci-parallel-vars package for a list of supported CI environments.
  • AVA now detects when it's required from a Node.js REPL.
  • We've improved the colors for use on light terminal themes.
  • The assert module in Node.js 10 no longer crashes.
  • Source maps, generated by AVA when compiling test & helper files, now contain correct paths to the source files.
  • TTY support for process.stderr is now emulated in the worker processes.
  • The default reporter now includes files that did not declare any tests in its final output.
  • AVA now prints pending tests when timeouts occur, when using --verbose.
  • <React.Fragment> can be used in t.deepEqual.
  • title functions of macros now receive undefined rather than an empty string if no title was given in the test declaration. This means you can use default parameters.

Breaking changes since 0.25.0

Supported Node.js versions

We've published a statement with regards to which Node.js versions we intend to support. As of this release we're only supporting Node.js 6.12.3 or newer, 8.9.4 or newer, 10.0.0 or newer and 11.0.0 or newer. This does not include Node.js 7 and 9.

Tests must now have titles, and they must be unique

You can no longer do:

test(t => t.pass());

Instead all tests must have titles, and they must be unique within the test file:

test('passes', t => t.pass());

This makes it easier to pinpoint test failures and makes snapshots better too.

Note that AVA no longer infers a test title from a function name:

test(function myTest (t) {
  t.pass();
});

Modifier chaining

AVA's various test modifiers (.serial, .skip) must now be used in the correct order:

  • .serial must be used at the beginning, e.g. test.serial().
  • .only and .skip must be used at the end, e.g. test.skip(). You cannot combine them.
  • .failing must be used at the end, but can be followed by .only and .skip, e.g. test.cb.failing() and test.cb.failing.only().
  • .always can only be used after .after and .afterEach, e.g. test.after.always().
  • .todo() is only available on test and test.serial. No further modifiers can be applied.

Declaring tests

You must declare all tests and hooks at once. This was always the intent but previously AVA didn't enforce it very well. Now, once you declare a test or hook, all other tests and hooks must be declared synchronously. However you can perform some asynchronous actions before declaring your tests and hooks.

test export

We're no longer exporting the test() method as a named export. Where before you could use import {test} from 'ava', you should now write import test from 'ava'.

Set default title using parameters syntax

Macros can generate a test title. Previously, AVA would call the title function with an empty string if no title was given in the test declaration. Now, it'll pass undefined instead. This means you can use default parameters. Here's an example:

import test from 'ava'

const failsToParse = (t, input) => {
t.throws(parse(input))
}

failsToParse.title = (providedTitle = 'unexpected input') => </span>throws when parsing <span class="pl-s1"><span class="pl-pse">${</span>providedTitle<span class="pl-pse">}</span></span><span class="pl-pds">

test('malformed', failsToParse, fs.readFileSync('fixtures/malformed.txt'))
test(failsToParse, Buffer.from('}', 'utf8'))

This is a breaking change if you were concatenating the provided title, under the assumption that it was an empty string.

Assertions

t.throws() & t.notThrows()

Thrown exceptions (or rejection reasons) must now be error objects.

t.throws() and t.notThrows() no longer support observables or promises. For the latter, use await t.throwsAsync() and await t.notThrowsAsync() instead.

Generally speaking, you should be able to replace every occurence of await t.throws with await t.throwsAsync, and await t.notThrows with await t.notThrowsAsync. A transform file for jscodeshift is available in this Gist. Run it like:

$ npx jscodeshift -t https://gist.githubusercontent.com/novemberborn/c2cdc94020083a1cafe3f41e8276f983/raw/eaa64c55dfcda8006fc760054055372bb3109d1c/transform.js test.js

Change test.js to a glob pattern that matches your test files. See the jscodeshift CLI usage documentation for further details.

Skipping assertions

Assertions can be skipped by using .skip at the end of the assertion, e.g. t.deepEqual.skip(). You can now safely skip snapshot tests, though not whilst updating snapshots.

t.ifError()

We've removed the t.ifError() assertion. It worked the same as t.falsy(), so if you were using it please switch to t.falsy() instead.

Configuration changes

The source option has been renamed to sources. This is now consistent with files. AVA will exit with an error if it encounters the source option.

We've also removed unintentional support for init, watch and updateSnapshot options.

Babel

The "default" and "inherit" configuration values have been removed. Babel options must now be specified in a testOptions object. This will allow us to add source related options in the future.

The powerAssert option and command line flags have been removed. You can now disable AVA's test enhancements by setting compileEnhancements to false.

The Babel recipe has been updated with the latest details.

Updated type definitions

The TypeScript and Flow definitions have been rewritten. The definitions export different interfaces so you may need to update your test code as well.

TypeScript now type-checks additional arguments used by macros. You must type the arguments used.

Internals

Some other internals have changed. You shouldn't have been relying on these, though if you did we're interested in hearing about it so we can better support your use case.

  • The private t._test value has been removed
  • Some of the communication between the main process and the test workers has changed
  • Access to the options object from inside a worker process has changed

Other potential breaking changes

  • We've removed support for @std/esm, in favor of the plain esm package.
  • The ava/stage-4 preset is applied after all other plugins and presets.
  • Test implementations are now called with null as the this value.
  • All reporters write to stdout. The stdout and stderroutput from workers is written to process.stderr. AVA will insert linebreaks in process.stdout after writing a chunk to process.stderrthat does not end in a line break.
  • The --no-cache CLI flag has been replaced by a --reset-cache command. The latter resets AVA's regular cache location. You can still disable the cache through the cache configuration option.
  • We've dropped support for using generator functions as test implementations. This was a remnant of the dark days before async/await support.
  • Snapshots need to be regenerated.
  • If you pre-compile your test files, the snapshot files may be created at new file paths. You'll have to manually remove any old files.

New recipes

There's a new recipe on using ES modules. We've also added a recipe on setting up tests and how test webapps using AVA and Puppeteer.

All changes 📚

v0.25.0...v1.0.1

Thanks 💌

💖 Huge thanks to @okyantoro, @JasonRitchie, @forresst, @mdvorscak, @kugtong33, @motss, @BusbyActual, @billyjanitsch, @Briantmorr, @jdalton, @malimichael, @martypdx, @clemtrek, @samuelli, @emilyschultz, @hallettj, @isnifer, @Jaden-Giordano, @good-idea, @jamiebuilds, @tobil, @TheDancingCode, @btkostner, @CanRau, @coreyfarrell, @ivanschwarz, @jagoda, @padmaia, @ronen, @sh7dm, @sharkykh, @Phrynobatrachus, @grant37, @xxczaki, @robertbernardbrown, @lo1tuma, @goooseman, @wmik, @vancouverwill, @qlonik, @vlajos and @itskolli 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 218 commits.

  • 783944f 1.0.1
  • 024bab7 1.0.0
  • aac41dc Reword introduction
  • 84d8fff Bump dependencies & update documentation
  • c1364a1 Update the tagline and readme intro (#1983)
  • eed2e7a Clarify that not all configuration options can be overridden by CLI flags
  • 93e91c9 Fix 'sources' option in configuration docs
  • 3bc80b0 Remove moot ESLint disable comment
  • 311c197 Fix snapshot skip interface
  • 0e82b04 1.0.0-rc.2
  • f97e277 Bump dependencies
  • 6f54db8 Type additional arguments used by macros
  • a82fee5 Documentation updates
  • afe028a CI updates
  • 1ba31d8 Reorganize documentation

There are 218 commits in total.

See the full diff

greenkeeper bot added a commit that referenced this pull request Jan 13, 2019
@greenkeeper
Copy link
Author

greenkeeper bot commented Jan 13, 2019

  • The devDependency ava was updated from 0.19.1 to 1.1.0.

Update to this version instead 🚀

Release Notes for 1.1.0

1.1.0

New features

AVA now exports a meta object. Currently, you can retrieve the path of the test file being run:

import test from 'ava';

console.log('Test currently being run: ', test.meta.file);

import {meta} from 'ava';

console.log('Test currently being run: ', meta.file);

This is useful in helpers that need to know the test file. bccd297

Bug fixes and other improvements

  • t.log() now works in hooks d187712

  • Error output for improper usage of t.throws() once again links to the correct documentation dc552bc

  • We've added a section on webpack aliases to the Babel recipe c3bcbf2

  • We've updated the Vue recipe for Babel 7, and added a section on webpack aliases c3bcbf2

All changes 📚

v1.0.1...v1.1.0

Thanks 💌

💖 Huge thanks to @fitztrev, @forresst, @astrob0t, @pearofducks, @coreyfarrell and @dflupu 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 9 commits.

  • a28094a 1.1.0
  • 7262a78 Bump dependencies
  • d187712 Fix t.log() in hooks
  • bccd297 Expose test file path within worker process
  • c3bcbf2 Improve Babel and Vue recipes
  • dc552bc Update link to t.throws() assertion in AVA output
  • f4b2d19 Fix links to French translation of docs (#2005)
  • 2e72fe7 Fix npm install command in readme (#2001)
  • 7b6e578 Use newer ES syntax where possible

See the full diff

greenkeeper bot added a commit that referenced this pull request Jan 27, 2019
@greenkeeper
Copy link
Author

greenkeeper bot commented Jan 27, 2019

  • The devDependency ava was updated from 0.19.1 to 1.2.0.

Update to this version instead 🚀

Release Notes for 1.2.0

New features

You can now set a timeout for test themselves. The test will fail if this timeout is exceeded. The timeout is reset each time an assertion is made:

test('foo', t => {
	t.timeout(100); // 100 milliseconds
	// Write your assertions here
});

b65c6d7

AVA also has a global timeout feature. The mini reporter now logs tests that were pending when those timeouts occur. Additionally, if you interrupt a test using ctrl+c we'll now also show the pending tests. 2b60556

Thank you @dflupu for your hard work on this!

Bug fixes and other improvements

  • We're no longer truncating multi-line error messages 72e0762
  • Unexpected errors in the throws assertions are now reported with the correct stack trace ad087f2
  • The Debugging with VSCode recipe has been updated with the correct workspaceFolder variable 0a5fe42 and --serial argument placement edfc005

All changes 📚

v1.1.0...v1.2.0

Thanks 💌

💖 Huge thanks to @anishkny, @CrispusDH, @dflupu and @niktekusho 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 11 commits.

  • 010914b 1.2.0
  • ad087f2 Fix stack traces in throw assertions
  • 8ad5efd Bump dependencies
  • 2b60556 Print pending tests on interrupt, and on timeout in mini reporter
  • 0a5fe42 Change deprecated workspaceRoot variable to the equivalent workspaceFolder
  • b65c6d7 Add t.timeout()
  • ed7807e Linter fixes
  • f0a07cd Rely on npm 6.6.0
  • 6b10f2e Bump XO and fix some lint issues
  • 72e0762 Fix accidental truncation of multi-line error messages
  • edfc005 Fix profile.js example

See the full diff

greenkeeper bot added a commit that referenced this pull request Feb 5, 2019
@greenkeeper
Copy link
Author

greenkeeper bot commented Feb 5, 2019

  • The devDependency ava was updated from 0.19.1 to 1.2.1.

Update to this version instead 🚀

Release Notes for 1.2.1

This is a bug fix release. In very large projects, the options send to worker processes would exceed limits on process argument size. We're now sending the options via the inter-process communication channel. 3078892

All changes 📚

v1.2.0...v1.2.1

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 2 commits.

See the full diff

greenkeeper bot added a commit that referenced this pull request Mar 5, 2019
@greenkeeper
Copy link
Author

greenkeeper bot commented Mar 5, 2019

  • The devDependency ava was updated from 0.19.1 to 1.3.0.

Update to this version instead 🚀

Release Notes for 1.3.0

Bug fixes

  • We've fixed a rather embarrasing bug with t.throws() and t.throwsAsync(). If you'd set a code expectation to a number we never actually checked that the thrown error had such a code! Thanks to @qlonik for both spotting and fixing this. 82daa5e
  • 1.2.0 contained a regression which meant that if you faked clearTimeout(), you'd break AVA. That's now been fixed. 40f331c
  • Snapshot files are now recognized as source files, so if you're using watch mode and you delete one, AVA won't rerun all your test files. d066f6f

New features

You can now use require() in ava.config.js files to load non-ES modules. 334e15b

All changes

v1.2.1...v1.3.0

Thanks

Thank you @itaisteinherz, @jdalton, @kagawagao, @KompKK, @SleeplessByte, @Chrisyee22 and @qlonik for helping us with this release. We couldn't have done this 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 12 commits.

  • b0fadb4 1.3.0
  • 9600966 Bump dependencies
  • 82daa5e Assert on expected error code, even when a number
  • 1e3b072 Document timeout configuration
  • d97f11d Improve pronunciation examples
  • 40f331c Fix unbound reference to clearTimeout
  • 334e15b Support require() in config files
  • 5751226 Added few tests for lib/chalk.js
  • 7d10446 Fix link to Babel recipe
  • 565822e Update esm package detection
  • 2fce19f Remove the typings field in package.json
  • d066f6f Recognize snapshot files as source files

See the full diff

greenkeeper bot added a commit that referenced this pull request Mar 5, 2019
@greenkeeper
Copy link
Author

greenkeeper bot commented Mar 5, 2019

  • The devDependency ava was updated from 0.19.1 to 1.3.1.

Update to this version instead 🚀

Release Notes for 1.3.1

Bug fixes

  • We've fixed a rather embarrasing bug with t.throws() and t.throwsAsync(). If you'd set a code expectation to a number we never actually checked that the thrown error had such a code! Thanks to @qlonik for both spotting and fixing this. 82daa5e
  • 1.2.0 contained a regression which meant that if you faked clearTimeout(), you'd break AVA. That's now been fixed. 40f331c
  • Snapshot files are now recognized as source files, so if you're using watch mode and you delete one, AVA won't rerun all your test files. d066f6f

New features

You can now use require() in ava.config.js files to load non-ES modules. 334e15b

All changes

v1.2.1...v1.3.1

Thanks

Thank you @itaisteinherz, @jdalton, @kagawagao, @KompKK, @SleeplessByte, @Chrisyee22 and @qlonik for helping us with this release. We couldn't have done this 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 2 commits.

See the full diff

greenkeeper bot added a commit that referenced this pull request Mar 24, 2019
@greenkeeper
Copy link
Author

greenkeeper bot commented Mar 24, 2019

  • The devDependency ava was updated from 0.19.1 to 1.4.0.

Update to this version instead 🚀

Release Notes for 1.4.0

Focusing power-assert

AVA comes with power-assert built-in, giving you more descriptive assertion messages. However it's been confusing to understand which assertions come with power-assert. To address this we've added the new t.assert() assertion. It's now the only assertion that is power-assert enabled. The assertion passes if called with a truthy value. Consider this example:

test('enhanced assertions', t => {
	const a = /foo/;
	const b = 'bar';
	const c = 'baz';
	t.assert(a.test(b) || b === c);
});
AVA will output:
6:   const c = 'baz';
7:   t.assert(a.test(b) || b === c);
8: });

Value is not truthy:

false

a.test(b) || b === c
=> false

b === c
=> false

c
=> 'baz'

b
=> 'bar'

a.test(b)
=> false

b
=> 'bar'

a
=> /foo/

Our ESLint plugin has been updated to support this new assertion. Many thanks to @eemed for implementing this! 9406470

Watch mode

Watch mode now prints the available commands. Thanks @KompKK! cd256ac

Bug fixes

  • Filtered tests (when using --match, .skip() or .only()) are no longer included in the list of pending tests when timeouts occur or when you interrupt a test run. Thanks @vancouverwill! 23e302a
  • We're now shimming all TTY methods in the worker processes, thanks to @okyantoro. c1f6fdf

Documentation updates

  • We've added a note to say that, by default, AVA does not have a default test timeout. Thanks @amokmen! 99a10a1

All changes

v1.3.1...v1.4.0

Thanks

Thank you @eemed, @KompKK, @vancouverwill, @okyantoro and @amokmen. We couldn't have done this 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 7 commits.

  • 20db474 1.4.0
  • 0154a7f Bump dependencies
  • 9406470 Only apply power-assert to new t.assert() assertion
  • c1f6fdf Shim all tty methods
  • 23e302a Don't report filtered tests as pending
  • 99a10a1 Document that there is no default timeout
  • cd256ac Print commands in watch mode

See the full diff

greenkeeper bot added a commit that referenced this pull request Mar 28, 2019
@greenkeeper
Copy link
Author

greenkeeper bot commented Mar 28, 2019

  • The devDependency ava was updated from 0.19.1 to 1.4.1.

Update to this version instead 🚀

Release Notes for 1.4.1

Focusing power-assert

AVA comes with power-assert built-in, giving you more descriptive assertion messages. However it's been confusing to understand which assertions come with power-assert. To address this we've added the new t.assert() assertion. It's now the only assertion that is power-assert enabled. The assertion passes if called with a truthy value. Consider this example:

test('enhanced assertions', t => {
	const a = /foo/;
	const b = 'bar';
	const c = 'baz';
	t.assert(a.test(b) || b === c);
});
AVA will output:
6:   const c = 'baz';
7:   t.assert(a.test(b) || b === c);
8: });

Value is not truthy:

false

a.test(b) || b === c
=> false

b === c
=> false

c
=> 'baz'

b
=> 'bar'

a.test(b)
=> false

b
=> 'bar'

a
=> /foo/

Our ESLint plugin has been updated to support this new assertion. Many thanks to @eemed for implementing this! 9406470

Watch mode

Watch mode now prints the available commands. Thanks @KompKK! cd256ac

Bug fixes

  • Filtered tests (when using --match, .skip() or .only()) are no longer included in the list of pending tests when timeouts occur or when you interrupt a test run. Thanks @vancouverwill! 23e302a
  • We're now shimming all TTY methods in the worker processes, thanks to @okyantoro. c1f6fdf

Documentation updates

  • We've added a note to say that, by default, AVA does not have a default test timeout. Thanks @amokmen! 99a10a1

All changes

v1.3.1...v1.4.1

Thanks

Thank you @eemed, @KompKK, @vancouverwill, @okyantoro and @amokmen. We couldn't have done this 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 3 commits.

  • 9ef456b 1.4.1
  • 55d973d Tweak reporter integration tests so they pass on Node.js 12-pre
  • a7605de Add t.assert() to type definitions

See the full diff

greenkeeper bot added a commit that referenced this pull request Jun 1, 2019
@greenkeeper
Copy link
Author

greenkeeper bot commented Jun 1, 2019

  • The devDependency ava was updated from 0.19.1 to 2.0.0.

Update to this version instead 🚀

Release Notes for 2.0.0

Breaking changes

AVA now requires at least Node.js 8.9.4

Per the Node.js release schedule, the 6.x releases reach end of live on April 30th. Consequently we've removed support in AVA. We are now testing with Node.js 12 though. 3a4afc6

Test file and helper selection

We've been working on simplifying how test files and helpers are selected. First off, the files option now only accepts glob patterns. If you configured it with directories before, please add /**/* to get the previous behavior.

The files and sources options must now be arrays containing at least one pattern. It's no longer possible to override a default exclusion pattern, but we're looking at making these configurable separately.

AVA used to treat all files inside a helpers directory as test helpers. Finding these files could be really slow, however, and it also meant you couldn't have tests inside a helpers directory. Instead you can now specify glob paterns to find these helpers:

{
  "ava": {
    "helpers": [
      "**/helpers/**/*"
    ]
  }
}

Test files starting with an underscore are still recognized as helpers.

Files inside fixtures directories are no longer ignored, and will now be treated as test files. The watcher now also watches ava.config.js files.

AVA now also selects files ending with .spec.js when looking for tests, as well as looking in tests directories. 08e99e5 b1e54b1

The CLI now only takes file paths, not glob patterns.

We'd like some help updating our ESLint plugin as well.

Snapshots in CI

When you run tests locally and add a new snapshot, AVA automatically updates the .snap file. However if you forget to commit this file and then run your CI tests, they won't fail because AVA quietly updates the .snap file, just like it does locally.

With this release, AVA will fail the t.snapshot() assertion if it is run in CI and no snapshot could be found. 0804107

Assertion messages must be strings

AVA now enforces assertion messages to be strings. The message is only used when the assertion fails, and non-string values may cause AVA to crash. You may see test failures if you were accidentally passing a non-string message. 49120aa

Flow type definitions

We've decided to remove the Flow type definitions from AVA itself. We don't have anybody to maintain them and consequently they've become a blocker when adding features to AVA. c633cf0

We've set up a new repository from which we'll publish the definitions, but we need your help setting it up. If you use AVA and Flow, please join us in avajs/flow-typed#1.

Observable typing

Test implementations may return observables. We've updated our TypeScript definition to require these to have a Symbol.observable function. c2d8218

New features

Configurable printing depth

AVA now uses the util.inspect.defaultOptions.depth option when printing objects, so you can configure the depth. 98034fb

Specify environment variables in your AVA config

You can now specify environment variables in your config, using the environmentVariables object. a53ea15

Other changes

  • We've added UntitledMacro and UntitledCbMacro types, for macro functions that will never have a .title function. Though really this just helped simplify the type definition. Thanks @qlonik! ebf4807
  • The dependency tracking in watch mode now respects custom require hooks you install in the worker processes. Thanks @lo1tuma! cb4c809
  • The TypeScript definition once again allows test.skip(macro) ba5cd80
  • AVA now exposes some methods to our ESLint plugin, allowing our plugin to support the new test & helper file selection. 51433be

All changes

v1.4.1...v2.0.0

Thanks

Thank you @StoneCypher, @LukasHechenberger, @lo1tuma, @htor, @alexisfontaine and @grnch. We couldn't have done this 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 36 commits.

  • e1572d9 2.0.0
  • 2daf6a9 Bump dependencies
  • b1e54b1 By default, select test and helpers inside 'tests' directories
  • 677578f Replace individual lodash packages with the main package
  • a53ea15 Define environment variables to be injected in the test file processes
  • 626e58c 2.0.0-rc.1
  • 51433be Implement helper for our ESLint plugin
  • c10e38c Remove underline from Babel configuration validation errors
  • 928ed14 Bump dependencies
  • 98034fb Make the object printing depth configurable (#2121)
  • f26634b 2.0.0-beta.2
  • 80d72ff Bump dependencies
  • 5f4c96f Further helper selection improvements
  • ba5cd80 Fix TypeScript definition allowing macro-without-title-using-tests to be skipped
  • 13a89e1 Reduce size of logo in readme

There are 36 commits in total.

See the full diff

greenkeeper bot added a commit that referenced this pull request Sep 16, 2019
@greenkeeper
Copy link
Author

greenkeeper bot commented Sep 16, 2019

  • The devDependency ava was updated from 0.19.1 to 2.4.0.

Update to this version instead 🚀

greenkeeper bot added a commit that referenced this pull request Jan 19, 2020
@greenkeeper
Copy link
Author

greenkeeper bot commented Jan 19, 2020

  • The devDependency ava was updated from 0.19.1 to 3.0.0.

Update to this version instead 🚀

greenkeeper bot added a commit that referenced this pull request Jan 26, 2020
@greenkeeper
Copy link
Author

greenkeeper bot commented Jan 26, 2020

  • The devDependency ava was updated from 0.19.1 to 3.1.0.

Update to this version instead 🚀

greenkeeper bot added a commit that referenced this pull request Feb 2, 2020
@greenkeeper
Copy link
Author

greenkeeper bot commented Feb 2, 2020

  • The devDependency ava was updated from 0.19.1 to 3.2.0.

Update to this version instead 🚀

greenkeeper bot added a commit that referenced this pull request Feb 9, 2020
@greenkeeper
Copy link
Author

greenkeeper bot commented Feb 9, 2020

  • The devDependency ava was updated from 0.19.1 to 3.3.0.

Update to this version instead 🚀

greenkeeper bot added a commit that referenced this pull request Feb 23, 2020
@greenkeeper
Copy link
Author

greenkeeper bot commented Feb 23, 2020

  • The devDependency ava was updated from 0.19.1 to 3.4.0.

Update to this version instead 🚀

greenkeeper bot added a commit that referenced this pull request Mar 1, 2020
@greenkeeper
Copy link
Author

greenkeeper bot commented Mar 1, 2020

  • The devDependency ava was updated from 0.19.1 to 3.5.0.

Update to this version instead 🚀

greenkeeper bot added a commit that referenced this pull request Mar 22, 2020
@greenkeeper
Copy link
Author

greenkeeper bot commented Mar 22, 2020

  • The devDependency ava was updated from 0.19.1 to 3.5.1.

Update to this version instead 🚀

greenkeeper bot added a commit that referenced this pull request Mar 30, 2020
@greenkeeper
Copy link
Author

greenkeeper bot commented Mar 30, 2020

  • The devDependency ava was updated from 0.19.1 to 3.5.2.

Update to this version instead 🚀

greenkeeper bot added a commit that referenced this pull request Apr 5, 2020
@greenkeeper
Copy link
Author

greenkeeper bot commented Apr 5, 2020

  • The devDependency ava was updated from 0.19.1 to 3.6.0.

Update to this version instead 🚀

greenkeeper bot added a commit that referenced this pull request Apr 13, 2020
@greenkeeper
Copy link
Author

greenkeeper bot commented Apr 13, 2020

  • The devDependency ava was updated from 0.19.1 to 3.7.0.

Update to this version instead 🚀

greenkeeper bot added a commit that referenced this pull request Apr 19, 2020
@greenkeeper
Copy link
Author

greenkeeper bot commented Apr 19, 2020

  • The devDependency ava was updated from 0.19.1 to 3.7.1.

Update to this version instead 🚀

greenkeeper bot added a commit that referenced this pull request Apr 26, 2020
@greenkeeper
Copy link
Author

greenkeeper bot commented Apr 26, 2020

  • The devDependency ava was updated from 0.19.1 to 3.8.0.

Update to this version instead 🚀

greenkeeper bot added a commit that referenced this pull request Apr 27, 2020
@greenkeeper
Copy link
Author

greenkeeper bot commented Apr 27, 2020

  • The devDependency ava was updated from 0.19.1 to 3.8.1.

Update to this version instead 🚀

greenkeeper bot added a commit that referenced this pull request May 8, 2020
@greenkeeper
Copy link
Author

greenkeeper bot commented May 8, 2020


🚨 Reminder! Less than one month left to migrate your repositories over to Snyk before Greenkeeper says goodbye on June 3rd! 💜 🚚💨 💚

Find out how to migrate to Snyk at greenkeeper.io


  • The devDependency ava was updated from 0.19.1 to 3.8.2.

Update to this version instead 🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

0 participants