Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: avajs/ava
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: e401bd151b1a81f79ccb106f034b2e18715ee125
Choose a base ref
...
head repository: avajs/ava
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: b4cfc8dd9b74a0899a1186b749c380da01245985
Choose a head ref

Commits on Nov 28, 2017

  1. Update npm, test Node.js 9, detect package-lock churn in CI (#1601)

    * Use npm@5.6.0 in CI
    
    * Detect package-lock.json churn during CI
    
    * Add Node.js 9 to CI matrix
    
    * Used npx to run codecov
    novemberborn authored and sindresorhus committed Nov 28, 2017
    Copy the full SHA
    4124d77 View commit details

Commits on Dec 17, 2017

  1. Use supertap to generate TAP output (#1610)

    Vadim Demedes authored Dec 17, 2017
    Copy the full SHA
    965cbc6 View commit details

Commits on Dec 28, 2017

  1. Copy the full SHA
    4e8f827 View commit details

Commits on Jan 3, 2018

  1. Copy the full SHA
    c1faf95 View commit details

Commits on Jan 8, 2018

  1. Copy the full SHA
    29e5dfd View commit details
  2. support @std/esm (#1618)

    * support @std/esm
    
    * fix path test for windows
    
    * fix linter error
    
    * Stricter regex. Use shorthand .esmrc file in fixture.
    
    * update package-lock.json
    jamestalmage authored Jan 8, 2018
    2
    Copy the full SHA
    72c53be View commit details

Commits on Jan 16, 2018

  1. Copy the full SHA
    aaddc37 View commit details

Commits on Jan 17, 2018

  1. Copy the full SHA
    4a13966 View commit details

Commits on Jan 20, 2018

  1. Update code-excerpt to ^2.1.1

    kugtong33 authored and novemberborn committed Jan 20, 2018
    Copy the full SHA
    947f207 View commit details

Commits on Jan 21, 2018

  1. Copy the full SHA
    cd8c91b View commit details

Commits on Jan 22, 2018

  1. Recommend skipFiles for VSCode debugging

    VSCode steps into native code at each `await` statement.  using skipFiles on node_internals yields a more dev-expected debug experience.
    cdaringe authored and novemberborn committed Jan 22, 2018
    Copy the full SHA
    bcb77fc View commit details

Commits on Jan 24, 2018

  1. Mention #1319 as a pitfall

    jy95 authored and novemberborn committed Jan 24, 2018
    Copy the full SHA
    c2b42ec View commit details

Commits on Jan 25, 2018

  1. Copy the full SHA
    f00f3c4 View commit details
  2. Copy the full SHA
    4f896c2 View commit details

Commits on Jan 26, 2018

  1. 0.25.0

    novemberborn committed Jan 26, 2018
    Copy the full SHA
    a051d3e View commit details

Commits on Jan 27, 2018

  1. Babel 7 support and additional enhancements

    Fixes #1598. Switches AVA's Babel implementation to use Babel 7. This applies to test and helper file compilation.
    
    Adds a `compileEnhancements` option which can be set to `false` to disable Power Assert and our `t.throws()` helper.
    
    Changes the Babel configuration. If you had this before:
    
    ```json
    "ava": {
      "babel": {
        "plugins": []
      }
    }
    ```
    
    You'll now need:
    
    ```json
    "ava": {
      "babel": {
        "testOptions": {
          "plugins": []
        }
      }
    }
    ```
    
    `ava.babel.testOptions.babelrc` now defaults to `true`. You can disable our stage-4 preset by adding `["ava/stage-4", false]` to `ava.babel.testOptions.presets`. Set `ava.babel` to `false` to disable AVA's test file compilation, **whilst still compiling enhancements**. If `compileEnhancements` is *also* set to `false` then Babel is skipped completely.
    
    Fixes #1225, #1488 and #1556.
    novemberborn authored Jan 27, 2018
    Copy the full SHA
    b33cb1d View commit details
  2. Add support statement

    Fixes #1599
    novemberborn committed Jan 27, 2018
    Copy the full SHA
    2e54c17 View commit details
  3. Use prepare script

    Fixes #1541.
    novemberborn committed Jan 27, 2018
    Copy the full SHA
    74cd934 View commit details
  4. Update deps

    novemberborn authored Jan 27, 2018
    Copy the full SHA
    7be7fe8 View commit details

Commits on Jan 29, 2018

  1. Copy the full SHA
    40604ee View commit details
  2. Require unique test titles

    * Require tests to have titles
    
    Stop deriving a title from the test implementation function's name.
    
    Note that this can't quite be expressed in the type definitions.
    Hopefully when we tackle #1182 it'll be easier to write the appropriate
    definition.
    
    * Require test titles to be unique
    
    Fixes #1207.
    novemberborn authored Jan 29, 2018
    Copy the full SHA
    fe7a8a1 View commit details
  3. Clean up CLI module

    * Remove 'ava --init foo.js' example
    
    * Stop --init, --watch and --update-snapshots from being configured in package.json
    
    * Declare flags in a more useful order
    
    * Remove --require error
    
    * Simplify custom flag validation
    
    * Rename 'source' option to 'sources'
    novemberborn authored Jan 29, 2018
    Copy the full SHA
    b6fa8b9 View commit details
  4. Share glob caches (#1661)

    novemberborn authored and sindresorhus committed Jan 29, 2018
    Copy the full SHA
    a84c96f View commit details
  5. Update @ava/stage-4 preset

    Always load syntax plugins, the preset does not necessarily load them if
    the environment supports the language feature natively. The syntax
    plugins can be removed once Babel can parse the syntax unaided.
    novemberborn committed Jan 29, 2018
    Copy the full SHA
    18b09b2 View commit details
  6. Copy the full SHA
    50b0b4e View commit details

Commits on Jan 30, 2018

  1. Load compiled helpers if in the "require" configuration

    AVA now installs its source map support and precompiler hook *before*
    processing the "require" paths. This means that helpers can safely be
    added to the "require" configuration and their compiled versions will be
    loaded. Fixes #1506.
    novemberborn committed Jan 30, 2018
    Copy the full SHA
    56b56c1 View commit details
  2. Copy the full SHA
    b8364ca View commit details
  3. Copy the full SHA
    d42865b View commit details

Commits on Jan 31, 2018

  1. Ensure profile.js skips test file compilation like regular runs

    Read the 'compileEnhancements' option from package.json and guard
    against the Babel config helper not returning any config.
    novemberborn committed Jan 31, 2018
    Copy the full SHA
    1de3657 View commit details
  2. Copy the full SHA
    aafe225 View commit details
  3. 1.0.0-beta.1

    novemberborn committed Jan 31, 2018
    Copy the full SHA
    4d60d5d View commit details

Commits on Feb 1, 2018

  1. Copy the full SHA
    47b8b56 View commit details

Commits on Feb 4, 2018

  1. Copy the full SHA
    a28c896 View commit details
  2. Restrict test modifier chaining

    Explicitly specify allowable chains, with some ground rules in mind:
    
    Test chaining rules:
    
    * `serial` must come at the start
    * `only` and `skip` must come at the end
    * `failing` must come at the end, but can be followed by `only` and `skip`
    * `only` and `skip` cannot be chained together
    * no repeating
    
    Hook chaining rules:
    
    * `always` comes immediately after "after hooks"
    * `skip` must come at the end
    * no `only`
    * no repeating
    
    Additionally:
    
    * `todo` cannot be chained, except after `serial`
    * hooks are not available on `serial`
    
    This commit also removes now unnecessary assertions from TestCollection.
    
    Fixes #1182.
    novemberborn committed Feb 4, 2018
    Copy the full SHA
    7c0bf9b View commit details
  3. Refactor TypeScript definition

    Remove the need for a build step.
    
    Update the `throws` and `notThrows` assertions, adding `Observable` and
    allowing the returned error to be typed.
    
    Remove the inline documentation, to be added later.
    
    Simplify typing of `t.context`. Reassigning the `test` method along with
    a type cast is now sufficient.
    
    Update to TypeScript 2.7.1.
    novemberborn committed Feb 4, 2018
    Copy the full SHA
    bac3c11 View commit details
  4. Refactor Flowtype definition

    Minor syntactical changes aside, it's now equivalent to the TypeScript
    definition!
    novemberborn committed Feb 4, 2018
    Copy the full SHA
    b2954a8 View commit details

Commits on Feb 6, 2018

  1. Copy the full SHA
    73baf70 View commit details
  2. Copy the full SHA
    51a0ff0 View commit details

Commits on Feb 11, 2018

  1. Copy the full SHA
    705b787 View commit details
  2. Refactor API module

    Remove indirection by inlining code. It's not the prettiest without
    async-await but it's easier to follow.
    
    Remove unnecessary auto-binding of methods. There's no need to "get"
    blank results either when running a test files fails.
    
    Handle timeouts within a test run, without touching the `runStatus`
    object. Restart the timeout timer whenever a new "fork" is created. This
    gives new test files the chance to start running tests. Don't start the
    timer *before* running any tests. Fixes #1377.
    
    Clean up "fork" instances when test files exit.
    
    Set up a new precompiler on every test run. Don't store it on the `Api`
    instance. If caching is enabled, fix the caching directory relative to
    the project directory, without looking it up again.
    
    Compile all test and helpers files before running any test. This doesn't
    improve time-to-first-test but it does mean that test files can depend
    on each other. AVA will correctly load the precompiled file. No tests
    are run if any file fails to compile.
    
    Pass the real path to the precompiler.
    
    Compute `execArgv` when a test file is run, not all at once for all
    files.
    novemberborn committed Feb 11, 2018
    Copy the full SHA
    82f4083 View commit details
  3. Copy the full SHA
    5c8baff View commit details
  4. Improve failFast at API level

    Don't run new test files after:
    
    * A timeout has occurred
    * A test has failed
    * Running the test file itself caused an error
    
    Refs #1158.
    novemberborn committed Feb 11, 2018
    Copy the full SHA
    f83f8c0 View commit details
  5. Access worker options through dedicated module

    This module is necessary since there may be circular dependencies
    originating in test-worker.js. Make setting and getting the options
    explicit, prevent options from being replaced and require them to be
    set. This will help catch any future issues caused by changing the
    dependency tree.
    novemberborn committed Feb 11, 2018
    Copy the full SHA
    1f4d503 View commit details
  6. Replace lib/globals

    Replace lib/globals.js by a module which focuses on reexporting Node.js'
    timers and Date.now().
    
    Remove workarounds from profile.js, presuming they're outdated and don't
    apply to methods from Node.js' `timers` module.
    novemberborn committed Feb 11, 2018
    Copy the full SHA
    da9bb0a View commit details
  7. Consistent output for rejections/exceptions in mini and verbose repor…

    …ters
    
    * Make error type more readable
    * Always include originating test file
    * Indent error summary, allowing for multi-line summaries
    * Correctly handle non-errors in verbose reporter
    novemberborn committed Feb 11, 2018
    Copy the full SHA
    039b646 View commit details
  8. Special serialization logic for SyntaxErrors

    SyntaxError stacks may begin with the offending code. Include all stack
    lines up to and including one that begins with SyntaxError.
    novemberborn committed Feb 11, 2018
    Copy the full SHA
    019f037 View commit details
  9. Move logic from lib/main.js to lib/test-worker.js

    This focuses lib/main.js on creating and exporting the runner, while the
    worker focuses on managing IPC, catching errors, and doing generally
    doing the work.
    
    The worker now guards against repeatedly sending stats, or sending test
    results after it's started to exit.
    
    Required and test files are loaded at the end, after handlers for
    uncaught exceptions and unhandled rejections have been installed.
    novemberborn committed Feb 11, 2018
    Copy the full SHA
    d4d60db View commit details
  10. Clean up collecting and running tests

    Test runners will now run tests as soon as (in the next tick) they're
    declared. The main process no longer instructs the workers to start
    running tests.
    
    Various IPC commands had to be changed to ensure we can still detect
    whether "ava" is loaded, or whether a test file contains no actual
    tests.
    
    Fixes #1674.
    novemberborn committed Feb 11, 2018
    Copy the full SHA
    7762ea2 View commit details
  11. Keep IPC channel referenced once it's needed again

    Ensure the IPC channel stays referenced. This is a safe-guard: it's easy
    to end up in a situation where the channel needs to be referenced but
    it's unreferenced because other code wasn't aware.
    novemberborn committed Feb 11, 2018
    Copy the full SHA
    6128625 View commit details
  12. Copy the full SHA
    2153497 View commit details
Showing 542 changed files with 27,311 additions and 25,165 deletions.
3 changes: 1 addition & 2 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
* text=auto
*.js text eol=lf
* text=auto eol=lf
*.ai binary
*.psd binary
File renamed without changes.
72 changes: 72 additions & 0 deletions .github/CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
# Contributing to AVA

✨ Thanks for contributing to AVA! ✨

Please note that this project is released with a [Contributor Code of Conduct](CODE_OF_CONDUCT.md). By participating in this project you agree to abide by its terms.

Translations: [Español](https://github.com/avajs/ava-docs/blob/master/es_ES/contributing.md), [Français](https://github.com/avajs/ava-docs/blob/master/fr_FR/contributing.md), [Italiano](https://github.com/avajs/ava-docs/blob/master/it_IT/contributing.md), [日本語](https://github.com/avajs/ava-docs/blob/master/ja_JP/contributing.md), [Português](https://github.com/avajs/ava-docs/blob/master/pt_BR/contributing.md), [Русский](https://github.com/avajs/ava-docs/blob/master/ru_RU/contributing.md), [简体中文](https://github.com/avajs/ava-docs/blob/master/zh_CN/contributing.md)

## How can I contribute?

### Improve documentation

As a user of AVA you're the perfect candidate to help us improve our documentation. Typo corrections, error fixes, better explanations, more examples, etc. Open issues for things that could be improved. [Help translate our docs.](https://github.com/avajs/ava-docs) Anything. Even improvements to this document.

Use the [`scope:documentation` label](https://github.com/avajs/ava/labels/scope%3Adocumentation) to find suggestions for what we'd love to see more documentation on.

### Improve issues

Some issues are created with missing information, not reproducible, or plain invalid. Help make them easier to resolve. Handling issues takes a lot of time that we could rather spend on fixing bugs and adding features.

### Give feedback on issues

We're always looking for more opinions on discussions in the issue tracker. It's a good opportunity to influence the future direction of AVA.

The [`needs triage`](https://github.com/avajs/ava/labels/needs%20triage) and [`question`](https://github.com/avajs/ava/labels/question) labels are a good place to find ongoing discussions.

### Help out

You can use issue labels to discover issues you could help out with:

* [`blocked` issues](https://github.com/avajs/ava/labels/blocked) need help getting unstuck
* [`bug` issues](https://github.com/avajs/ava/labels/bug) are known bugs we'd like to fix
* [`enhancement` issues](https://github.com/avajs/ava/labels/enhancement) are features we're open to including
* [`performance` issues](https://github.com/avajs/ava/labels/performance) track ideas on how to improve AVA's performance

The [`help wanted`](https://github.com/avajs/ava/labels/help%20wanted) and [`good for beginner`](https://github.com/avajs/ava/labels/good%20for%20beginner) labels are especially useful.

You may find an issue is assigned. Please double-check before starting on this issue because somebody else is likely already working on it.

We'd like to fix [`priority` issues](https://github.com/avajs/ava/labels/priority) first. We'd love to see progress on [`low-priority` issues](https://github.com/avajs/ava/labels/low%20priority) too. [`future` issues](https://github.com/avajs/ava/labels/future) are those that we'd like to get to, but not anytime soon. Please check before working on these since we may not yet want to take on the burden of supporting those features.

Read on for tips on contributing code.

### Hang out in our chat

We have a [chat](https://spectrum.chat/ava). Jump in there and lurk, talk to us, and help others.

## Contributing code

Once you find an issue you'd like to work on leave a comment so others are aware. We'll then assign you to the issue.

Of course you can work on things that do not yet have an issue. However if you're going to be putting in a lot of effort it's best to discuss it first.

When you're ready to get feedback on your work, open a [draft pull request](https://help.github.com/en/github/collaborating-with-issues-and-pull-requests/about-pull-requests#draft-pull-requests). It's fine if the work's not yet done, but please do let us know what's remaining. This lets reviewers know not to nit-pick small details or point out improvements you already know you need to make.

Reviewing large pull requests can take a lot of time. Time that may not always be available. Smaller pull requests may land more quickly. If you're introducing a new feature think about how it might be broken up. It's OK to land features as [opt-in experiments](https://github.com/avajs/ava/blob/master/docs/06-configuration.md#experiments). These require less documentation and test coverage.

Try and avoid making breaking changes. Those take more time to ship. Instead make the new behavior opt-in. This way your feature can ship, and you can use it, on its own schedule.

Non-experimental features should be accompanied with tests and documentation.

Don't include unrelated changes in your pull request. Make sure tests pass on your machine by running `npm test`. You can run specific test files as well using `npx tap --no-cov test/{file}.js`.

When you make a pull request please use a clear and descriptive title. Be specific about what's changed and why.

Please make sure the *Allow edits from maintainers* box is checked. That way we can make certain minor changes ourselves, allowing your pull request to be merged sooner.

You might be asked to make changes to your pull request. There's never a need to open another pull request. Push more commits to your existing branch. We'll squash them when we merge the PR.

Dependencies are managed using `npm`. Only update dependencies when needed for your pull request. Don't rebuild the lockfile.

And finally, have fun!
15 changes: 15 additions & 0 deletions .github/ISSUE_TEMPLATE/bug.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
---
name: Bug Report
about: If something isn't working the way you expect it to
labels: needs triage
---

Please provide details about:

* What you're trying to do
* What happened
* What you expected to happen

Please share relevant sample code. Or better yet, provide a link to a [minimal reproducible example](https://stackoverflow.com/help/minimal-reproducible-example).

We'll also need your AVA configuration (in `package.json` or `ava.config.*` configuration files) and how you're invoking AVA. Share the installed AVA version (get it by running `npx ava --version`).
11 changes: 11 additions & 0 deletions .github/ISSUE_TEMPLATE/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
blank_issues_enabled: true
contact_links:
- name: Babel
url: https://github.com/avajs/babel/issues
about: Ask about using Babel with AVA
- name: AVA on Spectrum
url: https://spectrum.chat/ava
about: Ask questions and discuss in our Spectrum community
- name: Stack Overflow
url: https://stackoverflow.com/questions/tagged/ava
about: Tag your question on Stack Overflow
11 changes: 11 additions & 0 deletions .github/ISSUE_TEMPLATE/feature.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
---
name: Feature Request
about: Suggestions for new or different behavior
labels: question
---

Please provide details about:

* What you're trying to do
* Why you can't use AVA for this
* And maybe how you think AVA could handle this
71 changes: 0 additions & 71 deletions .github/issue_template.md

This file was deleted.

5 changes: 0 additions & 5 deletions .github/pull_request_template.md

This file was deleted.

72 changes: 72 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
name: Install and test AVA
on:
push:
branches:
- master
pull_request:
paths-ignore:
- '*.md'
- 'docs/**'
- 'media/**'
jobs:
nodejs:
name: Node.js
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
node-version: [^10.18.0, ^12.14.0, ^13.5.0]
os: [ubuntu-latest, windows-latest]
steps:
- uses: actions/checkout@v1
with:
fetch-depth: 1
- name: Enable symlinks
if: matrix.os == 'windows-latest'
run: |
git config core.symlinks true
git reset --hard
- uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}
- run: npm ci --no-audit
- run: npm test
- uses: codecov/codecov-action@v1
with:
token: ${{ secrets.CODECOV_TOKEN }}

lockfile_churn:
name: Test package-lock for unexpected modifications
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
with:
fetch-depth: 1
- uses: actions/setup-node@v1
with:
node-version: ^12.14.0
- name: Upgrade npm
run: if [[ "$(npm -v)" != "6.13.4" ]]; then npm install --global npm@6.13.4; fi
- run: npm ci --no-audit
- name: Test package-lock for unexpected modifications
run: |
npm -v
checksum=$(md5sum package-lock.json)
npm install --package-lock-only --no-audit
if ! echo ${checksum} | md5sum --quiet -c -; then
echo "package-lock.json was modified unexpectedly. Please rebuild it using npm@$(npm -v) and commit the changes."
exit 1
fi
without_lockfile:
name: Install dependencies without using a lockfile
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
with:
fetch-depth: 1
- uses: actions/setup-node@v1
with:
node-version: ^12.14.0
- run: npm install --no-shrinkwrap --no-audit
- run: npm test
3 changes: 1 addition & 2 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
node_modules
.nyc_output
coverage
bench/.results
types/generated.d.ts
test/.tmpdir
7 changes: 0 additions & 7 deletions .iron-node.js

This file was deleted.

23 changes: 0 additions & 23 deletions .travis.yml

This file was deleted.

Loading