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

4x tests updates #7162

Merged
merged 21 commits into from
Aug 2, 2024
Merged
Show file tree
Hide file tree
Changes from 6 commits
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
8 changes: 8 additions & 0 deletions packages/web3-core/src/web3_config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,14 @@ export abstract class Web3Config
const keys = Object.keys(options) as (keyof Web3ConfigOptions)[];
for (const key of keys) {
this._triggerConfigChange(key, options[key]);

if(!isNullish(options[key] &&
jdevcs marked this conversation as resolved.
Show resolved Hide resolved
typeof options[key] === 'number' &&
key === 'maxListenersWarningThreshold' as keyof Web3ConfigOptions) )
{
// additionally set in event emitter
this.setMaxListenerWarningThreshold(Number(options[key]));
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

bug fix: #5079 (comment)

}
}
Object.assign(this.config, options);
}
Expand Down
5 changes: 2 additions & 3 deletions packages/web3-eth-contract/test/unit/contract.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,6 @@ import {
GreeterWithOverloadingBytecode,
} from '../shared_fixtures/build/GreeterWithOverloading';
import { AllGetPastEventsData, getLogsData, getPastEventsData } from '../fixtures/unitTestFixtures';
import { getSystemTestProvider } from '../fixtures/system_test_utils';
import { erc721Abi } from '../fixtures/erc721';
import { ERC20TokenAbi } from '../shared_fixtures/build/ERC20Token';
import { processAsync } from '../shared_fixtures/utils';
Expand Down Expand Up @@ -150,7 +149,7 @@ describe('Contract', () => {
});

it('should set the provider, from options, upon instantiation', () => {
const provider = getSystemTestProvider();
const provider = "http://127.0.0.1:4545";
const contract = new Contract([], '', {
provider,
});
Expand All @@ -162,7 +161,7 @@ describe('Contract', () => {
});

it('should set the provider, from context, upon instantiation', () => {
const provider = getSystemTestProvider();
const provider = "http://127.0.0.1:4545";
const contract = new Contract(
[],
'',
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": "jest --config=./test/integration/jest.config.js --runInBand --forceExit",
"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
Loading
Loading