avajs / ava-files Goto Github PK
View Code? Open in Web Editor NEWDEPRECATED
Home Page: https://github.com/avajs/ava-files/issues/11
License: MIT License
DEPRECATED
Home Page: https://github.com/avajs/ava-files/issues/11
License: MIT License
This question has been in my head for a long time. I don't understand what's the point/benefit of having makeTestMatcher
and makeSourceMatcher
, which return functions.
Take the following example from the readme:
const isTest = avaFiles.makeTestMatcher();
isTest(filePath);
//=> true or false
const isSource = avaFiles.makeSourceMatcher();
isSource(filePath);
//=> true or false
What we could have instead:
const isTest = avaFiles.isTest(filePath);
// true or false
const isSource = avaFiles.isSource(filePath);
// true or false
The API is simpler & nicer, does not make & return functions and can be used in filter
or map
the same way.
Patterns starting with ./
, e.g. ./test/myTest.js
should be treated as test/myTest.js
. Otherwise they won't match change events from Chokidar, which ends up emitting the changed paths as test/myTest.js
.
avajs/ava#925 mentions the code was extracted to "allow other tools (i.e. atom-ava, linter, etc) to have access to the file selection logic."
I don't see it in atom-ava
's dependencies though.
Given the tight coupling I think it's easier if we can maintain this in AVA itself. We'll have to use TAP again for tests, so that sucks, but thinking about compatibility with current AVA releases sucks more IMHO.
@avajs/core?
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.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.