-
Notifications
You must be signed in to change notification settings - Fork 32
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
[rfq] add test for unknown chainid #3006
Comments
To add a test for an unknown chain ID, follow these steps:
it('should handle unknown chain ID', async () => {
const unknownChainID = 9999; // Example unknown chain ID
try {
await someFunctionThatUsesChainID(unknownChainID);
} catch (error) {
assert.equal(error.message, 'Unknown chain ID');
}
});
function someFunctionThatUsesChainID(chainID) {
const knownChainIDs = [1, 3, 4, 5]; // Example known chain IDs
if (!knownChainIDs.includes(chainID)) {
throw new Error('Unknown chain ID');
}
// existing functionality
}
References/packages/sdk-router/src/sdk.test.ts
|
No description provided.
The text was updated successfully, but these errors were encountered: