Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement FakeIpcProvider.reset (#3190) #3344

Merged
merged 2 commits into from
Jan 28, 2020
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
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;
nivida marked this conversation as resolved.
Show resolved Hide resolved
};


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

FakeIpcProvider.prototype.reset = function (type, callback) {
this.notificationCallbacks = [];
nivida marked this conversation as resolved.
Show resolved Hide resolved
};

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