This repository was archived by the owner on Mar 5, 2025. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +16
-0
lines changed
packages/web3-eth-contract/test/integration Expand file tree Collapse file tree 2 files changed +16
-0
lines changed Original file line number Diff line number Diff line change @@ -27,6 +27,7 @@ import {
2727 refillAccount ,
2828 signAndSendContractMethodEIP1559 ,
2929 signAndSendContractMethodEIP2930 ,
30+ closeOpenConnection ,
3031} from '../fixtures/system_test_utils' ;
3132import { processAsync , toUpperCaseHex } from '../shared_fixtures/utils' ;
3233
@@ -49,6 +50,10 @@ describe('contract', () => {
4950 } ;
5051 } ) ;
5152
53+ afterAll ( async ( ) => {
54+ await closeOpenConnection ( contract ) ;
55+ } ) ;
56+
5257 it ( 'should deploy the contract' , async ( ) => {
5358 const acc = await createTempAccount ( ) ;
5459 const sendOptionsLocal = { from : acc . address , gas : '10000000' } ;
@@ -74,6 +79,11 @@ describe('contract', () => {
7479 sendOptions = { from : mainAcc . address , gas : '10000000' } ;
7580 contractDeployed = await contract . deploy ( deployOptions ) . send ( sendOptions ) ;
7681 } ) ;
82+
83+ afterAll ( async ( ) => {
84+ await closeOpenConnection ( contractDeployed ) ;
85+ } ) ;
86+
7787 describe ( 'methods' , ( ) => {
7888 it ( 'should return the name' , async ( ) => {
7989 expect ( await contractDeployed . methods . name ( ) . call ( ) ) . toBe ( 'Gold' ) ;
Original file line number Diff line number Diff line change @@ -27,6 +27,7 @@ import {
2727 signAndSendContractMethodEIP2930 ,
2828 createNewAccount ,
2929 refillAccount ,
30+ closeOpenConnection ,
3031} from '../fixtures/system_test_utils' ;
3132import { processAsync , toUpperCaseHex } from '../shared_fixtures/utils' ;
3233
@@ -51,6 +52,11 @@ describe('contract', () => {
5152 sendOptions = { from : acc . address , gas : '10000000' } ;
5253 } ) ;
5354
55+ afterAll ( async ( ) => {
56+ await closeOpenConnection ( contract ) ;
57+ await closeOpenConnection ( contractDeployed ) ;
58+ } ) ;
59+
5460 it ( 'should deploy the contract' , async ( ) => {
5561 await expect ( contract . deploy ( deployOptions ) . send ( sendOptions ) ) . resolves . toBeDefined ( ) ;
5662 } ) ;
You can’t perform that action at this time.
0 commit comments