hardhat
Version:
Hardhat is an extensible developer tool that helps smart contract developers increase productivity by reliably bringing together the tools they want.
16 lines • 623 B
JavaScript
import { resolveFromRoot } from "@nomicfoundation/hardhat-utils/path";
export default async () => {
const handlers = {
registerFileForTestRunner: async (context, filePath, next) => {
const absoluteFilePath = resolveFromRoot(process.cwd(), filePath);
if (filePath.endsWith(".sol") &&
(filePath.endsWith(".t.sol") ||
absoluteFilePath.startsWith(context.config.paths.tests.solidity))) {
return "solidity";
}
return next(context, filePath);
},
};
return handlers;
};
//# sourceMappingURL=test.js.map