Skip to content

Commit

Permalink
refactor: code review improvements
Browse files Browse the repository at this point in the history
  • Loading branch information
ffmcgee725 committed Jan 10, 2025
1 parent 2296b30 commit 4039417
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ import {
describe('Initializing a session w/ several scopes and accounts, then calling `wallet_revokeSession`', function () {
const GANACHE_SCOPES = ['eip155:1337', 'eip155:1338', 'eip155:1000'];
const ACCOUNTS = [ACCOUNT_1, ACCOUNT_2];
it('Should receive empty object if `wallet_getSession` is called afterwards', async function () {
it('Should return empty object from `wallet_getSession` call', async function () {
await withFixtures(
{
title: this.test?.fullTitle(),
Expand All @@ -45,6 +45,18 @@ describe('Initializing a session w/ several scopes and accounts, then calling `w
await driver.delay(largeDelayMs);
await driver.switchToWindowWithTitle(WINDOW_TITLES.MultichainTestDApp);

/**
* We verify that scopes are not empty before calling `wallet_revokeSession`
*/
const { sessionScopes } = await getSessionScopes(driver);
for (const scope of GANACHE_SCOPES) {
assert.notStrictEqual(
sessionScopes[scope],
undefined,
`scope ${scope} should not be empty.`,
);
}

await driver.clickElement({
text: 'wallet_revokeSession',
tag: 'span',
Expand Down

0 comments on commit 4039417

Please sign in to comment.