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 dependency ava to v3.4.0 #190

Merged
merged 1 commit into from Feb 23, 2020
Merged

Update dependency ava to v3.4.0 #190

merged 1 commit into from Feb 23, 2020

Conversation

renovate[bot]
Copy link
Contributor

@renovate renovate bot commented Feb 23, 2020

This PR contains the following updates:

Package Type Update Change
ava (source) devDependencies minor 3.3.0 -> 3.4.0

Release Notes

avajs/ava

v3.4.0

Compare Source

Introducing the t.try() assertion

The new t.try() allows you to try assertions without causing the test to fail:

test('do the thing', async t => {
  const attempt = () => t.try(tt => {
    const result = await getResult()
    // getResult() can be flaky and sometimes throws :(
    tt.is(result, 'expected')
  })
  
  const firstAttempt = await attempt()
  if (firstAttempt.passed) return firstAttempt.commit()
  
  t.log('Retrying (just once)')
  firstAttempt.discard()
  const secondAttempt = await attempt()
  secondAttempt.commit()
})

You can use any test implementation with t.try(), including (arrays of) macros. You can decide what to do with attempts. You can even run attempts concurrently, so long as they don't use snapshot assertions.

This is great building block for handling all kinds of advanced test scenarios. We can't wait to see what you'll do with it! Find out more in the assertion documentation.

This feature was previously behind an experimental flag. That flag has now been removed. If you have enabled the flag you'll have to update your AVA config. Also note that as of this release, attempt titles are always prefixed with the title of the parent test 7ee3a0e.

Once again, thank you @​qlonik for contributing this new assertion.

Other changes

  • The t.throws() and t.throwsAsync() assertions can now be called with undefined as the second argument. Previously, if you wanted to set an assertion message but did not want to provide any expectations for the thrown error you had to pass null. That's still allowed, of course. d0e2161 @​stavalfi
  • ava.config.js files once again work with our @ava/typescript package f4d4edd
  • Our TypeScript definition no longer references @types/node 7a1dacf
  • We've improved the error message shown when test.cb() is used with asynchronous functions or observables f5a8c2b @​toddkcarlson
  • The Vue recipe has been updated to use jsdom-global instead of browser-env 3f9c616 @​Scrum
  • @​fisker optimized how we detect ESM support 8831f54

See avajs/ava@v3.3.0...v3.4.0 for all changes.


Renovate configuration

📅 Schedule: At any time (no schedule defined).

🚦 Automerge: Enabled.

♻️ Rebasing: Whenever PR becomes conflicted, or if you tick the rebase/retry checkbox below.

🔕 Ignore: Close this PR and you won't be reminded about this update again.


  • If you want to rebase/retry this PR, check this box

This PR has been generated by WhiteSource Renovate. View repository job log here.

@renovate renovate bot merged commit 341c1a0 into master Feb 23, 2020
@renovate renovate bot deleted the renovate/ava-3.x branch February 23, 2020 17:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant