Skip to content

sources ignored in ava.config.js #1982

@Christilut

Description

@Christilut

Description

I have added the sources section to ava.config.js as below but when I run this command:

npm run test:watch -- --verbose --match="foo"

The tests are not re-run when saving a file under the server/ path.

However, when I add the sources parameter as CLI argument then it does work as expect:

npm run test:watch -- --verbose --match="foo" --sources="server/**/*.ts"

And when I run without any argument then it the sources from ava.config.js does work:

npm run test:watch

So I guess when adding CLI arguments, the ava.config.js sources arguments is lost even when it is not added as a CLI argument. Is this expected behavior?

Config

export default {
  "compileEnhancements": false,
  "extensions": [
    "ts"
  ],
  "require": [
    "ts-node/register"
  ],
  "sources": [
    "server/**/*.ts"
  ],
  "files": [
    "tests/*.test.ts"
  ]
}

Command-Line Arguments

test script:

"test:watch": "ava --watch",

npm run test:watch -- --verbose --match="foo"

Environment

Tell us which operating system you are using, as well as which versions of Node.js, npm, and AVA. Run the following to get it quickly:

Node.js v8.12.0
ava 1.0.0-beta.8
npm 6.4.1

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions