Skip to content

Commit

Permalink
callThrough on matchMedia stub so only one behavior is stubbed (#41)
Browse files Browse the repository at this point in the history
  • Loading branch information
JayLaphamTR authored Nov 17, 2023
1 parent 57143ff commit d38d369
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions test/e2e/specs/common/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ Given('I open the home page', () => {
cy.visit(Cypress.env('BASE_URL'), {
onBeforeLoad(win) {
cy.stub(win, 'matchMedia')
.callThrough()
.withArgs('(prefers-color-scheme: dark)')
.returns({
matches: false,
Expand Down

0 comments on commit d38d369

Please sign in to comment.