Skip to content

Commit

Permalink
last failing test
Browse files Browse the repository at this point in the history
  • Loading branch information
krzysu committed Nov 6, 2024
1 parent 6fdddec commit 75f9224
Show file tree
Hide file tree
Showing 12 changed files with 301 additions and 310 deletions.
571 changes: 286 additions & 285 deletions .github/workflows/build.yml

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion packages/web3-account-abstraction/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
"test:ci": "jest --coverage=true --coverage-reporters=json --verbose",
"test:watch": "npm test -- --watch",
"test:unit": "jest --config=./test/unit/jest.config.js",
"test:integration": "exit 0"
"test:integration": "jest --config=./test/integration/jest.config.js --passWithNoTests"
},
"devDependencies": {
"@types/jest": "^28.1.6",
Expand Down
2 changes: 1 addition & 1 deletion packages/web3-core/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
"test:ci": "jest --coverage=true --coverage-reporters=json --verbose",
"test:watch": "npm test -- --watch",
"test:unit": "jest --config=./test/unit/jest.config.js",
"test:integration": "exit 0"
"test:integration": "jest --config=./test/integration/jest.config.js --passWithNoTests"
},
"dependencies": {
"web3-errors": "^1.3.0",
Expand Down
2 changes: 1 addition & 1 deletion packages/web3-errors/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
"test:ci": "jest --coverage=true --coverage-reporters=json --verbose",
"test:watch": "npm test -- --watch",
"test:unit": "jest --config=./test/unit/jest.config.js",
"test:integration": "exit 0"
"test:integration": "jest --config=./test/integration/jest.config.js --passWithNoTests"
},
"dependencies": {
"web3-types": "^1.7.0"
Expand Down
2 changes: 1 addition & 1 deletion packages/web3-eth-abi/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
"test:ci": "jest --coverage=true --coverage-reporters=json --verbose",
"test:watch": "npm test -- --watch",
"test:unit": "jest --config=./test/unit/jest.config.js",
"test:integration": "exit 0"
"test:integration": "jest --config=./test/integration/jest.config.js --passWithNoTests"
},
"dependencies": {
"abitype": "0.7.1",
Expand Down
2 changes: 1 addition & 1 deletion packages/web3-eth-accounts/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
"test:ci": "jest --coverage=true --coverage-reporters=json --verbose",
"test:watch": "npm test -- --watch",
"test:unit": "jest --config=./test/unit/jest.config.js",
"test:integration": "exit 0"
"test:integration": "jest --config=./test/integration/jest.config.js"
},
"devDependencies": {
"@types/jest": "^28.1.6",
Expand Down
2 changes: 1 addition & 1 deletion packages/web3-eth-contract/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
"test:ci": "jest --coverage=true --coverage-reporters=json --verbose",
"test:watch": "npm test -- --watch",
"test:unit": "jest --config=./test/unit/jest.config.js",
"test:integration": "jest --config=./test/integration/jest.config.js --runInBand --detectOpenHandles",
"test:integration": "jest --config=./test/integration/jest.config.js --runInBand",
"test:e2e:electron": "npx cypress run --headless --browser electron --env grep='ignore',invert=true",
"test:e2e:chrome": "npx cypress run --headless --browser chrome --env grep='ignore',invert=true",
"test:e2e:firefox": "npx cypress run --headless --browser firefox --env grep='ignore',invert=true"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,11 @@ along with web3.js. If not, see <http://www.gnu.org/licenses/>.
import { Web3Eth } from 'web3-eth';
import { FMT_BYTES, FMT_NUMBER } from 'web3-types';
import { Contract, createContractAddress } from '../../src';
import { sleep } from '../shared_fixtures/utils';
import { ERC721TokenAbi, ERC721TokenBytecode } from '../shared_fixtures/build/ERC721Token';
import { GreeterBytecode, GreeterAbi } from '../shared_fixtures/build/Greeter';
import { DeployRevertAbi, DeployRevertBytecode } from '../shared_fixtures/build/DeployRevert';
import {
getSystemTestProvider,
isWs,
createTempAccount,
createNewAccount,
signTxAndSendEIP2930,
Expand Down Expand Up @@ -245,26 +243,18 @@ describe('contract', () => {

it('should emit the "confirmation" event', async () => {
const confirmationHandler = jest.fn();
contract.setConfig({ transactionConfirmationBlocks: 1 });
await contract
contract.setConfig({ transactionConfirmationBlocks: 2 });

const promiEvent = contract
.deploy(deployOptions)
.send(sendOptions)
.on('confirmation', confirmationHandler);

// Wait for some time to allow the transaction to be processed
await sleep(500);

// Deploy once again to trigger block mining to trigger confirmation
// We can send any other transaction as well
await contract.deploy(deployOptions).send(sendOptions);
// Deploy the contract
await promiEvent;

await sendFewSampleTxs(3);

// Wait for some fraction of time to trigger the handler
// On http we use polling to get confirmation, so wait a bit longer
await sleep(isWs ? 500 : 2000);

// eslint-disable-next-line jest/no-standalone-expect
expect(confirmationHandler).toHaveBeenCalled();
});

Expand Down
2 changes: 1 addition & 1 deletion packages/web3-eth-ens/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
"test:ci": "jest --coverage=true --coverage-reporters=json --verbose",
"test:watch": "npm test -- --watch",
"test:unit": "jest --config=./test/unit/jest.config.js",
"test:integration": "exit 0",
"test:integration": "jest --config=./test/integration/jest.config.js",
"ens:download:registry": "curl -L -o test/fixtures/ens/registry.json 'https://api.etherscan.io/api?module=contract&action=getabi&address=0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e'",
"ens:download:reverse_registrar": "curl -L -o test/fixtures/ens/reverse_registrar.json 'https://api.etherscan.io/api?module=contract&action=getabi&address=0x084b1c3c81545d370f3634392de611caabff8148'"
},
Expand Down
2 changes: 1 addition & 1 deletion packages/web3-eth/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
"test:e2e:sepolia": "jest --config=./test/e2e/jest.config.js --forceExit",
"test:watch": "npm test -- --watch",
"test:unit": "jest --config=./test/unit/jest.config.js",
"test:integration": "exit 0",
"test:integration": "jest --config=./test/integration/jest.config.js --runInBand",
"test:coverage:integration": "jest --config=./test/integration/jest.config.js --runInBand --forceExit --coverage=true --coverage-reporters=text",
"test:e2e:electron": "npx cypress run --headless --browser electron",
"test:e2e:chrome": "npx cypress run --headless --browser chrome",
Expand Down
2 changes: 1 addition & 1 deletion packages/web3-providers-ws/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
"test:ci": "jest --coverage=true --coverage-reporters=json --verbose",
"test:watch": "npm test -- --watch",
"test:unit": "jest --config=./test/unit/jest.config.js",
"test:integration": "exit 0"
"test:integration": "jest --config=./test/integration/jest.config.js"
},
"devDependencies": {
"@types/express": "^4.17.13",
Expand Down
2 changes: 1 addition & 1 deletion packages/web3/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@
"test:ci": "jest --coverage=true --coverage-reporters=json --verbose",
"test:watch": "npm test -- --watch",
"test:unit": "jest --config=./test/unit/jest.config.js",
"test:integration": "exit 0",
"test:integration": "jest --config=./test/integration/jest.config.js --forceExit",
"test:integration:stress": "jest --config=./test/stress/jest.config.js --forceExit",
"test:blackbox:hardhat:http": "./scripts/black_box_test.sh hardhat http",
"test:blackbox:hardhat:ws": "./scripts/black_box_test.sh hardhat ws",
Expand Down

0 comments on commit 75f9224

Please sign in to comment.