Transpile 7bce2b72
This commit is contained in:
19
hardhat/task-test-get-files.js
Normal file
19
hardhat/task-test-get-files.js
Normal file
@ -0,0 +1,19 @@
|
||||
// ignores the proxy tests
|
||||
|
||||
const { internalTask } = require('hardhat/config');
|
||||
|
||||
const { TASK_TEST_GET_TEST_FILES } = require('hardhat/builtin-tasks/task-names');
|
||||
const glob = require('glob');
|
||||
const path = require('path');
|
||||
const { promisify } = require('util');
|
||||
|
||||
internalTask(TASK_TEST_GET_TEST_FILES)
|
||||
.setAction(async ({ testFiles }, { config }) => {
|
||||
if (testFiles.length !== 0) {
|
||||
return testFiles;
|
||||
}
|
||||
return await promisify(glob)(
|
||||
path.join(config.paths.tests, '**/*.js'),
|
||||
{ ignore: [path.join(config.paths.tests, 'proxy/**/*')] },
|
||||
);
|
||||
});
|
||||
Reference in New Issue
Block a user