Scans a repository directory, searching for a test files.
All files present in test folders will be returned, including non-javascript files. You may filter those files afterwards with Array#filter
.
$ npm install detect-repo-test-files
detectRepoTestFiles(dir) -> Promise
const detectRepoTestFiles = require('detect-repo-test-files');
detectRepoTestFiles('./some-repository-directory')
.then((files) => {
console.log(`detected ${files.length} test file(s)`);
console.log(files);
});
$ npm test
$ npm test-cov
to get coverage report
Released under the MIT License.