Skip to content
This repository has been archived by the owner on Nov 10, 2023. It is now read-only.

Update dependency ava to version 0.19.1 #20

Merged
merged 2 commits into from
Apr 30, 2017
Merged

Update dependency ava to version 0.19.1 #20

merged 2 commits into from
Apr 30, 2017

Conversation

renovate-bot
Copy link
Collaborator

@renovate-bot renovate-bot commented Apr 5, 2017

This Pull Request updates dependency ava from version 0.18.2 to 0.19.1

Changelog

0.19.1 / 2017-04-10

  • 0.19.1
  • Fix context for beforeEach and afterEach hooks in Flow type definition file (#1344)
  • Fix TypeScript definition for callback tests
    Fixes #1347
  • Set up regression testing for TypeScript
  • Avoid MaxListenersExceededWarning in Sequence
    Fixes #1345.

0.19.0 / 2017-04-05

  • 0.19.0
  • Fix get-port usage
    It's risky to pass a function to a map() operation, and indeed since
    [email protected] the getPort() function takes a first argument.
  • Fail tests that finish with pending assertions
    `t.throws()` and `t.notThrows()` can be called with an observable or
    promise. This commit forces users to wait for the assertion to complete
    before finishing the test. Usually this means the test has to be written
    like:
    ```js
    test(async t => {
    await t.throws(Promise.reject(new Error()))
    })
    ```
    Or for callback tests:
    ```js
    test.cb(t => {
    t.throws(Promise.reject(new Error())).then(t.end)
    })
    ```
    This simplifies internal logic and helps discourage code like in #1327.
    Anecdotally users are surprised by the previous behavior where a
    synchronous test worked with an asynchronous assertion
    (Too aggressive in declaring the test "finished" avajs/ava#1327 (comment)).
    Fixes #1327.
  • Remove unnecessary test to verify throws/notThrows return promises
  • Reword error message for when assertions are used after test has finished
  • Improve Babel recipe (#1290)
  • Set default color config based on supports-color
  • Document --color CLI flag
  • Don't highlight formatted values with --no-color
    Fixes #843
    (Switch to disable color output to console avajs/ava#843 (comment)). Values
    shouldn't be highlighted during formatting if colors are disabled.
  • Bump hullabaloo-config-manager
  • Make snapshots usable again
    • Make the Runner manage the snapshot state. Thread an accessor to the
      `t.snapshot()` assertion.
    • Save snapshots when runner has finished. Fixes #1218.
    • Use jest-snapshot directly, without serializing values. Use jest-diff
      to generate the diff if the snapshot doesn't match. This does mean the
      output is not colored and has other subtle differences with how other
      assertions format values, but that's OK for now. Fixes #1220, #1254.
    • Pin jest-snapshot and jest-diff versions. This isn't ideal but we're
      using private APIs and making other assumptions, so I'm not comfortable
      with using a loose SemVer range.
  • Refactor Runner
    • Don't mix option chain with the prototype, simply expose it on the
      instance. Actual code only exposed the `test` method to the user, and
      that happens to be the default starting point anyway
    • `run()` doesn't need to return stats
    • Ensure `run()` always returns a promise, and does not throw
    • Simplify `buildStats()`
    • Derive chainable methods from the actual chain when generating the
      TypeScript definition
    • Don't bother prefixing methods / properties with underscores
  • Remove mention of stage-2 in readme (#1325)
  • Integrate with improved throws helper
    Show instructions on how to use `t.throws()` with the test results,
    without writing them to stderr. Detect the improper usage even if user
    code swallows the error, meaning that tests will definitely fail.
    Assume that errors thrown, or emitted from an observable, or if the
    returned promise was rejected, that that error is due to the improper
    usage of `t.throws()`.
    Assume that if a test has a pending throws assertion, and an error leaks
    as an uncaught exception or an unhandled rejection, the error was
    thrown due to the pending throws assertion. Attribute it to the test.
  • Print error message before formatted assertion
    The formatted labels sometimes assume the context of the error message.
    And, since formatted values can be quite long, it's odd to see the
    message only at the very end.
  • Annotate AssertionErrors thrown due to improper usage
  • Expose runner instance to test worker
  • Allow error source to be fixed when assertion errors are created
    If the source is known through other means it doesn't have to be derived
    from the assertion error's stack trace.
  • Fix formatValue() reference (#1323)
    Fixes #1321
  • Fix issue with using 'chalk' in tests (#1244)
  • Fail test due to pending assertion, not a returned promise rejection
    If a pending assertion fails before the test implementation returns a
    rejected promise, the assertion failure should cause the test to fail,
    not the promise rejection.
  • Pass options object to Test constructor
    There are too many parameters.
  • Record stack for async throws assertions
    If the assertion fails, the AssertionError no longer has access to the
    stack of when the assertion was called. Record it before entering the
    promise chain.
  • Fail async tests if not ended before event loop empties
    Rather than keeping an infinite timer open, waiting for `t.end()` to be
    called, fail the callback test if it is not ended when the event loop
    empties.
    Similarly, fail promise/observable returning tests if the promise hasn't
    fulfilled or the observable hasn't completed when the event loop
    empties.
    Note that user code can keep the event loop busy, e.g. if it's listening
    on a socket or starts long timers. Even after this change, async tests
    may hang if the event loop is kept busy.
  • Fail tests that finish without running assertions
  • Try to fail test if assertions are added after test finishes
    Though currently this error is likely to get lost unless there is a
    pending assertion or `test.cb()` is used.
  • Refactor Test implementation
    • Do away with underscore prefixes. They were used inconsistently, and
      are generally not worth it
    • Keep `_test` prefixed in ExecutionContext, since that is exposed to
      calling code
    • Reorder methods
    • Assume all arguments are passed and are correct. They're already
      validated in `test-collection.js`
      *Pass metadata when instantiating Tests
    • Rewrite test finish logic. There's still a fair bit of interleaving
      due to the `test.cb()` API, but it's now a lot easier to understand.
      Due to the last change, tests with `t.end()` and only synchronous
      assertions end immediately. Previously they would end asynchronously
      due to a promise being in the completion chain.
      Similarly, returning a promise or observable for a `test.cb()` test
      immediately fails.
  • Stop returning full test results
    Test results are emitted directly, so Test#run() only needs to return a
    (promise for) a boolean, indicating whether the test passed.
    Make the same change in Concurrent and Sequence, and return a boolean
    if all runnables passed.
    Refactor tests to stop relying on Test instances returning their result.
  • Simplify Concurrent and Sequence
    There's no need to collect all results. Tests emit them directly.
  • Pass bail option to TestCollection constructor
    Simplify Runner by passing options to TestCollection.
  • Don't leak internal AssertionErrors to user code
    Asynchronous `t.throws()` / `t.notThrows()` was the only case where
    internal AssertionErrors were leaked to user code. Return `undefined`
    instead.
  • Clean up test-worker and process-adapter
    • Clarify responsibilities
    • Consistently import dependencies
    • Clarify significance of `exports.avaRequired`
    • Stop mimicking process with process-adapter. Reference it using
      `adapter` instead. Use the `process` global where applicable. Masking
      the process global with a mimicked object is unnecessarily confusing.
    • Remove superstitious delays in exiting workers
      The worker now only exits when told by the main process. This means the
      IPC channel must have drained before the main process can send the
      instruction. There's no need to wait before sending the message that
      teardown has completed.
      The AppVeyor workaround was introduced to solve Node.js 0.10 issues.
      We're no longer supporting that version. In theory, issues around
      flushing I/O exist regardless of whether AVA is running in AppVeyor.
      There is no clear way around this though, so let's assume it's not
      actually an issue.
  • Always skip todo tests
  • Remove unused hook class
  • Anticipate timers firing early
    Don't make the duration comparison so precise, since timers may fire
    early.
  • Bump dependencies and fix lint issues
  • Typecheck arguments to t.regex() and t.notRegex()
  • Reduce depth of formatted statements
    Only print the first level. For arrays/maps/objects/sets this means the
    indexes/keys are printed. Presumably since we do print all statements
    this provides enough context.
  • Format values when AssertionErrors are created
    Format statements, generate diffs and otherwise format values when
    AssertionErrors are created. Make labels contextual to the assertion.
    Always print power-assert statements in mini and verbose reporters, but
    after the values. Accept the duplication when the statement covers the
    value passed to the assertion.
    Detect whether `t.throws()` failed because no error was thrown, or because
    the thrown error did not meet expectations.
    Explicitly test `t.fail()` default message in assertion test.
  • More consistent use of backticks around assertions in error messages
  • Remove stackStartFunction from AssertionError
    At best it saves one stack level, but AVA code is already filtered out
    of the stacks, so this is really quite unnecessary.
  • Fix `nodeExternals` in the precompiling-with-webpack recipe (#1310)
  • Readme: Team-table minor fix (#1308)
  • Separate config keys from CLI flags (#1297)
  • Make test context optionally type aware for TypeScript (#1298)
  • Always fail tests with an assertion error
    Wrap callback errors, rejected promises or synchronously thrown values
    in an `AssertionError`. Rely on the `actual` value being printed by the
    reporters, which means it's still shown to the user.
    Remove now obsolete `Error: ` prefix added to non-assertion errors in
    `run-status.js`. Instead more helpful messages from `test.js` can be
    shown.
    Try to reuse the stack trace from any original error, so magic assert
    can show context.
    Fail `t.throws()` / `t.notThrows()` with an AssertionError if called
    with an improper argument, rather than throwing a TypeError.
  • Always print actual or expected assertion value
    This is especially useful for `t.notThrows()`, which includes the
    thrown exception as the `actual` value for the assertion error.
    Fixes #1150.
  • Refactor error serialization
    • Retain non-standard error properties in a cleaned `object` property
    • Make AssertionError serialization more explicit
    • Flag whether the serialized error came from AVA's AssertionError
  • Remove unnecessary variable and title fallback from mini reporter
  • Ensure test workers emit properly serialized errors
    Avoid having to normalize errors in `run-status.js`.
  • Refactor assertions
    • Use our own AssertionError class. Now we can track the assertion
      rather than abusing the operator field. We can also stop depending on
      `core-assert` once we implement `t.throws()` ourselves. Reserve the
      `statements` property for power-assert output
    • Directly create `AssertionError`s, making it easier to specify the
      varying options
    • Default the assertion message to an empty string, removing workarounds
      in the mini and verbose reporters
    • Improve `t.plan()` assertion errors. Specify 'plan' as the assertion,
      and use `===` as the operator
    • Refactor `t.throws()` and `t.notThrows()`, improving readability and
      fixing #1227
    • Move knowledge of when to show output into `serialize-error.js`. It
      sat kind of awkwardly in `assert.js`
    • Always try to format errors in mini and verbose reporters, check
      if actual / expected values are available when formatting
    • Wrap assertions in `assert.js` for use with the `ExecutionContext`
    • Only enhance the power-assert assertions, don't use `empower-core`
      to wrap the others
    • Remove superfluous `empower-core` 'originalMessage' handling. Our
      assertions create `AssertionError`s with the correct message
    • Refactor overloaded `Test#_assert()` method and assertion tracking
      internals. Note that only `t.throws()` and `notThrows()` are (possibly)
      asynchronous
  • Rename PublicApi to ExecutionContext
    This matches the terminology used in the README.
  • Define getters for t.title and t.end() in PublicApi class
  • Remove assertCount getter from execution context
    It's undocumented and unused.
  • Don't rely on is() assertion when validating test implementation
  • Docs: Add link to french translation of recipe webpack (#1305)
  • Add recipe for precompiling source files with webpack (#1212)
  • Improve YAML blocks in TAP reporter (#1301)
    • Properly dump errors
    • Only print actual and expected values if they're present, and strings.
      This assumes they're serialized in the test workers
    • Strip ANSI from actual and expected values
    • Print additional name & message properties
    • Determine 'at' value similar to serialize-error.js. Recompute since
      here we want the full line
    • Print unhandled errors using the same logic
  • Fix reporter bug when rejecting non-errors (#1281)
  • Update dependencies and some other minor tweaks
  • Resolve Babel options ahead of time 🎉 (#1262)
    • package-hash@^2
    • Allow precompiler setup to be asynchronous
    • Consistently refer to babel-config module as babelConfigHelper
    • Manage Babel config using hullabaloo
      Fixes #707
    • Disable Babel cache when precompiling
  • Use `diff-match-patch` for text diffs (#1285)
    `diff` is really slow for large strings
  • Make sure all string diff output is red by default (#1287)
  • Fix Babel require hook test for Node.js 7.6.0
    Node.js 7.6.0 supports async / await so the test doesn't throw an
    exception. Use the unsupported module syntax instead.
  • Readme tweak (#1282)

@renovate-bot renovate-bot changed the title Update dependency ava to version 0.19.0 Update dependency ava to version 0.19.1 Apr 10, 2017
@rarkins rarkins merged commit 226e4a7 into master Apr 30, 2017
@rarkins rarkins deleted the renovate/ava-0.x branch April 30, 2017 04:01
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.