Skip to content

Handle compilation/bundle stepΒ #2589

Closed
Closed
@fregante

Description

@fregante

Recently I found myself having to bundle the tests to overcome all the hurdles caused by combinations of AVA, TypeScript and type: "module" (vadimdemedes/dom-chef#68 and refined-github/refined-github#3206), so having AVA support some kind of build step might be helpful.

{
  "ava": {
    "build": "rollup --config --out tests tests/_source/*"
  }
}

Advantages over rollup && ava

  • running straight ava without having to run an npm script first
  • running ava --watch would trigger the build as well

Additionally, it could automatically handle the creation of a temporary build folder

{
  "ava": {
    // Notice there's no "source" folder anymore because AVA would treat $TEMP as the test folder
    "build": "rollup --config --out $TEMP tests/*"
  }
}

Additional advantages

  • not having to figure out and manually configure the temporary middle folder for git, AVA, XO

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions