Skip to content
This repository was archived by the owner on Mar 5, 2025. It is now read-only.

Commit a60a3f5

Browse files
committed
Fixed blocking test in eth.sendTransaction.js
1 parent 8dcc83c commit a60a3f5

File tree

1 file changed

+22
-2
lines changed

1 file changed

+22
-2
lines changed

test/eth.sendTransaction.js

+22-2
Original file line numberDiff line numberDiff line change
@@ -242,12 +242,12 @@ describe(method, function () {
242242
assert.deepEqual(payload.params, test.formattedArgs2 || []);
243243
});
244244
}
245-
245+
246246
provider.injectResult(null);
247247
provider.injectValidation(function (payload) {
248248
assert.equal(payload.method, 'eth_getTransactionReceipt');
249249
});
250-
250+
251251

252252
// if notification its sendTransaction, which needs two more results, subscription and receipt
253253
if(test.notification) {
@@ -327,6 +327,26 @@ describe(method, function () {
327327
}
328328

329329

330+
provider.injectResult(null);
331+
provider.injectValidation(function (payload) {
332+
assert.equal(payload.method, 'eth_getTransactionReceipt');
333+
});
334+
335+
336+
// if notification its sendTransaction, which needs two more results, subscription and receipt
337+
if(test.notification) {
338+
// inject receipt
339+
provider.injectResult({
340+
"blockHash": "0x6fd9e2a26ab",
341+
"blockNumber": "0x15df",
342+
"transactionHash": "0xc6ef2fc5426d6ad6fd9e2a26abeab0aa2411b7ab17f30a99d3cb96aed1d1055b",
343+
"transactionIndex": "0x1",
344+
"contractAddress": "0x407d73d8a49eeb85d32cf465507dd71d507100c1",
345+
"cumulativeGasUsed": "0x7f110",
346+
"gasUsed": "0x7f110"
347+
});
348+
}
349+
330350
var args = clone(test.args);
331351

332352
if(test.error) {

0 commit comments

Comments
 (0)