Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

extract ava-files to it's own module #925

Merged
merged 4 commits into from
Jun 19, 2016

Conversation

jamestalmage
Copy link
Contributor

@jamestalmage jamestalmage commented Jun 19, 2016

This will allow other tools (i.e. atom-ava, linter, etc) to have access to the file selection logic.

The external module includes the updates from #863, so I have closed that.

@novemberborn
Copy link
Member

Is the watcher still broken with this? (Didn't check why CI failed.)

Do we want to remove the --sources flag as part of this? (#863 (comment))

this.options = options || {};
this.options = objectAssign({}, options);
this.options.cwd = this.options.cwd || process.cwd();
this.options.resolveTestsFrom = this.options.resolveTestsFrom || this.options.cwd;
this.options.match = this.options.match || [];
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The above 3 options can just be put as defaults in the objectAssign call.

@jamestalmage
Copy link
Contributor Author

Is the watcher still broken with this? (Didn't check why CI failed.)

The CI failure was unrelated (npm install checksum errors), I restarted and it passed. Neither this or #863 "broke" watcher. But it doesn't improve it either. With this you can do ava some-file.js from a subdir and it works. With watcher, you will still need to run it from the root directory of the package for things to work.

It is a little more complicated to make watcher work in a subdir. As agreed, the sources config in package.json should be evaluated from the basedir regardless. If you ava -w some-file.js from the test subdir, you still want to watch for sources from the basedir, but the pattern you passed on the command line needs to be converted to be relative to the subdir. If we don't eliminate the --sources flag, that makes watching from a subdir even more complicated (I think).

@jamestalmage jamestalmage merged commit bdc57f4 into avajs:master Jun 19, 2016
@jamestalmage jamestalmage deleted the extract-ava-files branch June 19, 2016 19:22
@novemberborn
Copy link
Member

I've opened #936 and #937 for follow-up discussion.

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

Successfully merging this pull request may close these issues.

3 participants