Skip to content

Commit

Permalink
Merge pull request #3344 from ethereum/pri/fix-contract-js-test
Browse files Browse the repository at this point in the history
Implement FakeIpcProvider.reset (#3190)
  • Loading branch information
nivida authored Jan 28, 2020
2 parents 5e3ad84 + e303c61 commit d05d608
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
2 changes: 1 addition & 1 deletion test/contract.js
Original file line number Diff line number Diff line change
Expand Up @@ -240,7 +240,7 @@ var getEthContractInstance = function(abi, address, options, provider) {
}

var eth = new Eth(provider);
//eth.setProvider(provider);
eth.setProvider(provider);
return new eth.Contract(abi, address, options);
}

Expand Down
5 changes: 5 additions & 0 deletions test/helpers/FakeIpcProvider.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ var FakeIpcProvider = function IpcProvider() {
this.error = [];
this.validation = [];
this.notificationCallbacks = [];
this.connected = true;
};


Expand Down Expand Up @@ -67,6 +68,10 @@ FakeIpcProvider.prototype.on = function (type, callback) {
}
};

FakeIpcProvider.prototype.reset = function () {
this.notificationCallbacks = [];
};

FakeIpcProvider.prototype.getResponseOrError = function (type, payload) {
var _this = this;
var response;
Expand Down

0 comments on commit d05d608

Please sign in to comment.