Skip to content

Commit

Permalink
add additional assertion around experimental flag
Browse files Browse the repository at this point in the history
  • Loading branch information
lmiller1990 committed Aug 11, 2022
1 parent e83e56c commit bc430a9
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 0 deletions.
7 changes: 7 additions & 0 deletions packages/app/cypress/component/support/ctSupport.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,13 @@ export const StubWebsocket = new Proxy<Socket>(Object.create(null), {
},
})

beforeEach(() => {
// this is always 0, since we only destroy the AUT when using
// `experimentalSingleTabRunMode, which is not used in this package.
// @ts-expect-error
expect(window.top.getEventManager().autDestroyedCount).to.eq(0)
})

// Event manager with Cypress driver dependencies stubbed out
// Useful for component testing
export const createEventManager = () => {
Expand Down
7 changes: 7 additions & 0 deletions packages/app/cypress/e2e/support/e2eSupport.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
import '@packages/frontend-shared/cypress/e2e/support/e2eSupport'
import 'cypress-real-events/support'
import './execute-spec'

beforeEach(() => {
// this is always 0, since we only destroy the AUT when using
// `experimentalSingleTabRunMode, which is not a valid experiment for for e2e testing.
// @ts-expect-error
expect(window.top.getEventManager().autDestroyedCount).to.eq(0)
})

0 comments on commit bc430a9

Please sign in to comment.