stefanjudis / credits

Find out on whose work your project is based on
MIT License
10 stars 18 forks source link

Update ava to version 0.15.0 πŸš€ #49

Closed greenkeeperio-bot closed 8 years ago

greenkeeperio-bot commented 8 years ago

Hello :wave:

:rocket::rocket::rocket:

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 :palm_tree:


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

All Changes

v0.14.0...v0.15.0


The new version differs by 315 commits .

There are 250 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 :zap:

coveralls commented 8 years ago

Coverage Status

Coverage decreased (-0.06%) to 99.51% when pulling 82f73a902e0c60ae512f802c5561c9e5c60fb3dc on greenkeeper-ava-0.15.0 into ceae0a2cb235dbc5915ae7edb519952237ce5757 on master.