Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 2 additions & 3 deletions lib/api.js
Original file line number Diff line number Diff line change
Expand Up @@ -49,9 +49,8 @@ class API {
this.skipFiles = config.skipFiles || [];

this.log = config.log || console.log;

this.gasLimit = 0xffffffffff; // default "gas sent" with transactions
this.gasLimitString = "0xfffffffffff"; // block gas limit for ganache (higher than "gas sent")
this.gasLimit = 0x1fffffffffffff; // default "gas sent" with transactions
this.gasLimitString = "0x1fffffffffffff"; // block gas limit for ganache (higher than "gas sent")
this.gasPrice = 0x01;

this.istanbulFolder = config.istanbulFolder || false;
Expand Down
6 changes: 3 additions & 3 deletions plugins/hardhat.plugin.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ const nomiclabsUtils = require('./resources/nomiclabs.utils');
const PluginUI = require('./resources/nomiclabs.ui');

const pkg = require('./../package.json');
const death = require('death');
const path = require('path');

const { task, types } = require("hardhat/config");
Expand Down Expand Up @@ -87,12 +86,13 @@ task("coverage", "Generates a code coverage report for tests")
measureCoverage = true;

try {
death(nomiclabsUtils.finish.bind(null, config, api)); // Catch interrupt signals

config = nomiclabsUtils.normalizeConfig(env.config, args);
ui = new PluginUI(config.logger.log);
api = new API(utils.loadSolcoverJS(config));

// Catch interrupt signals
process.on("SIGINT", nomiclabsUtils.finish.bind(null, config, api));

// Version Info
ui.report('hardhat-versions', [pkg.version]);

Expand Down
7 changes: 3 additions & 4 deletions test/units/buidler/standard.js
Original file line number Diff line number Diff line change
Expand Up @@ -69,16 +69,15 @@ describe('Buidler Plugin: standard use cases', function() {
);
});

// Simple.sol with a failing assertion in a buidler-truffle5 test
it('unit tests failing', async function() {
mock.install('Simple', 'truffle-test-fail.js', solcoverConfig);
it('tests crash w/ syntax error', async function() {
mock.install('Simple', 'truffle-crash.js', solcoverConfig);
mock.buidlerSetupEnv(this);

try {
await this.env.run("coverage");
assert.fail()
} catch(err){
assert(err.message.includes('failed under coverage'));
assert(err.toString().includes('SyntaxError'));
}

verify.coverageGenerated(buidlerConfig);
Expand Down
2 changes: 1 addition & 1 deletion test/util/integration.js
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ function decacheConfigs(){
`${process.cwd()}/${temp}/contracts/Simple.sol`,
`${process.cwd()}/${temp}/test/simple.js`,
`${process.cwd()}/${temp}/test/account-one.js`,
`${process.cwd()}/${temp}/test/truffle-test-fail.js`
`${process.cwd()}/${temp}/test/truffle-crash.js`
];

paths.forEach(pth => {
Expand Down