Skip to content
This repository has been archived by the owner on May 25, 2019. It is now read-only.

node_modules, helpers, and fixtures aren't always ignored #5

Closed
sotojuan opened this issue Sep 19, 2016 · 4 comments
Closed

node_modules, helpers, and fixtures aren't always ignored #5

sotojuan opened this issue Sep 19, 2016 · 4 comments
Labels

Comments

@sotojuan
Copy link
Contributor

See avajs/ava#1026.

It seems that if a user sets files as a glob with /**/*.js, it'll pick up and run the test files as well as the files under node_modules/, helpers/, and fixtures/.

AVA's readme says those are always ignored, so it's either misleading or a bug with this module.

@sotojuan sotojuan added the bug label Sep 19, 2016
@sotojuan
Copy link
Contributor Author

Hm I just tested with a simple fixture and it seems to work correctly, so it might not be an issue with this?

@sotojuan
Copy link
Contributor Author

sotojuan commented Sep 19, 2016

I might set up a repo, but these are some reproduction steps:

├── assets
│   └── tests
│       ├── helpers
│       │   └── helper.js
│       └── test.js
├── package.json
└── test.js

Where both test.js are valid AVA test files but helper.js can be anything.

In package.json:

  "ava": {
    "files": "./assets/tests/**/*.js"
  }

You should get an error about helper.js.

If you have AVA linked with npm link, you can go to api.js and print files under line 82 to see the resolved files. If you use the verbose reporter, you'll see the helpers file in the files array.

@kevva
Copy link

kevva commented Sep 19, 2016

Looks like a glob issue to me. assets/tests/**/*.js works. Relevant https://github.com/isaacs/minimatch/blob/master/test/patterns.js#L130-L131.

@sotojuan
Copy link
Contributor Author

Sweet, thanks. Closing.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

2 participants