.solcover.js 659 B

1234567891011121314151617181920212223242526
  1. const shell = require("shelljs");
  2. /* The environment variables are loaded in buidler.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. mocha: {
  10. delay: true,
  11. },
  12. onCompileComplete: async function (_config) {
  13. await run("typechain");
  14. },
  15. onIstanbulComplete: async function (_config) {
  16. /* We need to do this because solcover generates bespoke artifacts. */
  17. shell.rm("-rf", "./artifacts");
  18. shell.rm("-rf", "./typechain");
  19. },
  20. providerOptions: {
  21. mnemonic,
  22. },
  23. skipFiles: ["mocks", "test"],
  24. };