Skip to content

Harmonize test file & source pattern handling #736

@novemberborn

Description

@novemberborn

Handling of test file patterns should be harmonized with how source patterns are handled (#614):

  • Use the default patterns if files is empty, or if it only contains negated patterns
  • Apply specified negated patterns together with the default exclusion patterns
  • Allow specified patterns to override the default exclusion patterns

The default exclusion patterns for source files are relative to the current working (node_modules/**/*) however the test file exclusion patterns can apply anywhere (**/node_modules/**). I guess that makes sense, though I'm not sure how to override the default exclusion patterns. Maybe that's not necessary for test files?

Should we change the source exclusion patterns? Or do those make more sense relative to the current working directory?


Implementation wise I think we can move the file selection tests in test/api.js to a new test/ava-files.js test file. We can set up a fixture directory to exercise the globbing behavior.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions