.solcover.js 620 B

1234567891011121314151617181920212223
  1. const shell = require("shelljs");
  2. // The environment variables are loaded in hardhat.config.ts
  3. const mnemonic = process.env.MNEMONIC;
  4. if (!mnemonic) {
  5. throw new Error("Please set your MNEMONIC in a .env file");
  6. }
  7. module.exports = {
  8. istanbulReporter: ["html"],
  9. onCompileComplete: async function (_config) {
  10. await run("typechain");
  11. },
  12. onIstanbulComplete: async function (_config) {
  13. // We need to do this because solcover generates bespoke artifacts.
  14. shell.rm("-rf", "./artifacts");
  15. shell.rm("-rf", "./typechain");
  16. },
  17. providerOptions: {
  18. mnemonic,
  19. },
  20. skipFiles: ["mocks", "test"],
  21. };