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 version 0.15.0 πŸš€ #22

Closed
wants to merge 1 commit into from

Conversation

greenkeeperio-bot
Copy link
Contributor

Hello πŸ‘‹

πŸš€πŸš€πŸš€

ava just published its new version 0.15.0, which is not covered by your current version range.

If this pull request passes your tests you can publish your software with the latest version of ava – otherwise use this branch to work on adaptions and fixes.

Happy fixing and merging 🌴


GitHub Release

In this release we've added some very useful features we think you'll like. There are no known breaking changes. We have worked hard on fixing bugs and improving performance. Going forward stability and performance will be our top priority as we're progressing towards a stable release. Finally, we're delighted to welcome @sotojuan to the team! πŸŽ‰

Test file conventions

When you run AVA without any arguments, it tries to find your test files based on some conventions. The previous release had the following default patterns:

test.js test-*.js test/**/*.js

In this release we added additional default patterns based on community conventions:

test.js test-*.js test/**/*.js **/__tests__/**/*.js **/*.test.js

This means AVA will now also run test files in __tests__ directories and test files ending in .test.js anywhere in your project.

9ceeb11

Known failing tests

A big part of open source maintenance is triaging issues. This can be a tedious task, involving a lot of back and forth with the person reporting the issue. Submitting a PR with a failing test makes the whole process much more efficient. It helps maintainers by providing a quality reproduction, allowing them to focus on code over triaging. Users benefit as their bugs get fixed faster.

To make it easier to submit failing tests, we're introducing a new test modifier: test.failing(). These tests are run just like normal ones, but they are expected to fail, and will not break your build when they do. If a test marked as failing actually passes, the build will break with a helpful message instructing you to remove the .failing modifier.

test.failing('demonstrate some bug', t => {
    t.fail(); // test will count as passed
});

This allows you to merge .failing tests before a fix is implemented without breaking CI. It is also a great way to recognize good bug reports with a commit credit, even if the reporter is unable to fix the problem.

0410a03

Test macros

Sometimes you want to run a series of very similar tests, each with different inputs and expected results. The traditional solution is to use test generator functions. However, this makes it difficult to perform static analysis on the tests, which is especially important for linting. In this release, we are introducing test macros as the official way to create reusable tests.

Test macros let you reuse test implementations. Additional arguments passed in the test declaration are forwarded to the macro:

function macro(t, input, expected) {
    t.is(eval(input), expected);
}

test('2 + 2 === 4', macro, '2 + 2', 4);
test('2 * 3 === 6', macro, '2 * 3', 6);

If you are generating lots of tests from a single macro, you may want to generate the test title programmatically:

macro.title = (providedTitle, input, expected) => {
 return `${input} === ${expected}`
};

a454128

Limited concurrency [EXPERIMENTAL]

Concurrency is awesome! It's what makes AVA so fast. Our default behavior is to spin up an isolated process for every test file immediately, and then run all your tests. However, for users with lots of test files, this was eating up too many system resources, causing memory and IO thrashing. We are experimenting with an option to let you limit how many tests files AVA runs at the same time. If you have a lot of test files, try running AVA with the --concurrency flag. For example, run $ ava --concurrency=5 and see if the performance improves. Please let us know how it works for you! We need feedback on the feature.

Note: This is an experimental feature and might change or be removed in the future.

1c3c86c

Highlights

  • Add after.always and afterEach.always hooks. 61f0958
  • Improve t.deepEqual(). 973624d
  • Improve watch logging. 95a5c97
  • Disable TAP-reporter in watch mode. 02b0aae
  • Throwing synchronously inside a callback-style test now fail it immediately. d6acdde
  • Detect improper use of t.throws. 3201b1b
  • Protect against bad argument passed to t.throws. 60bd8a5
  • Improve power-assert output. 84c05fe
  • Add spinner fallback for Windows. c4e58e3
  • Warn about npm link usage on Node.js 6. a543b9f
  • Remember failures from previous tests in watch mode. aab2207
  • Fix crash in 'fake' browser environment. 0fa229e
  • Fix warning when no files are found. ee76aa9
  • Strip ANSI escape codes in the TAP output. 3c4babd
  • React recipe. 4c69c79
  • Italian translation of the docs. 195390e

All Changes

v0.14.0...v0.15.0


The new version differs by 92 commits .

  • c9c00d6 0.15.0
  • 7486dcb add test.failing and add cb to test.serial (#866)
  • 77b55e5 Move images to media folder.
  • 463dbd4 bump update-notifier. (#869)
  • bc11e08 Fix AppVeyor Badge (leave it pointing to Sindre's account).
  • 6f83264 document always hook with fail fast flag (#858)
  • 1d51231 fix warning message
  • a499523 Drop unusedsilentoption fromlib/fork.js. (#864)
  • a543b9f revert npm link fix. (#859)
  • 0ef6dc4 Fix "Test files must be run with the AVA CLI" warning. (#862)
  • e01ee00 Pass shared caches toglobby. (#860)
  • 3763109 Avoid running the same file multiple times (#856)
  • 178175f add output for failing tests (#837)
  • ea9c752 added missing todo definition for typescript (#846)
  • f35da7e RunStatus#prefixTitle should remove this.base only if it occurs at the beginning of the path (#844)

There are 92 commits in total. See the full diff.


This pull request was created by greenkeeper.io.
It keeps your software up to date, all the time.

Tired of seeing this sponsor message? Upgrade to the supporter plan! You'll also get your pull requests faster ⚑

@coveralls
Copy link

Coverage Status

Coverage remained the same at 93.103% when pulling b7df0bf on greenkeeper-ava-0.15.0 into 6f09c61 on master.

@coveralls
Copy link

coveralls commented Jul 26, 2016

Coverage Status

Coverage remained the same at 93.103% when pulling 1bab001 on greenkeeper-ava-0.15.0 into 370fd7e on master.

@tusharmath tusharmath closed this Aug 7, 2016
@tusharmath tusharmath deleted the greenkeeper-ava-0.15.0 branch August 7, 2016 06:40
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

3 participants