Skip to content

Commit

Permalink
🔥 chore(fixtures): Remove extensionId cache (#989)
Browse files Browse the repository at this point in the history
  • Loading branch information
duckception authored Nov 11, 2023
1 parent b1ac6b7 commit 489621c
Showing 1 changed file with 2 additions and 7 deletions.
9 changes: 2 additions & 7 deletions packages/fixtures/src/fixtures/testWithSynpress.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@ type PublicSynpressFixtures = {
type SynpressFixtures = TestFixtures & PrivateSynpressFixtures & PublicSynpressFixtures

// TODO: Bad practice. Use a store!
let _extensionId: string
let _metamaskPage: Page

const synpressFixtures = (
Expand Down Expand Up @@ -87,13 +86,9 @@ const synpressFixtures = (
await context.close()
},
extensionId: async ({ context }, use) => {
if (_extensionId) {
await use(_extensionId)
}

_extensionId = await getExtensionId(context, 'MetaMask')
const extensionId = await getExtensionId(context, 'MetaMask')

await use(_extensionId)
await use(extensionId)
},
metamaskPage: async ({ context: _ }, use) => {
await use(_metamaskPage)
Expand Down

0 comments on commit 489621c

Please sign in to comment.