Skip to content

Commit

Permalink
test: do not expect to report origin of pointer-events: none in bro…
Browse files Browse the repository at this point in the history
…wser
  • Loading branch information
ph-fritsche committed Jan 9, 2025
1 parent 2dc8035 commit 4ab1c71
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion tests/utils/pointer/cssPointerEvents.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import {createConfig, createInstance} from '#src/setup/setup'
import {assertPointerEvents, hasPointerEvents} from '#src/utils'
import {setup} from '#testHelpers'
import {isJsdomEnv, setup} from '#testHelpers'

function setupInstance() {
return createInstance(createConfig()).instance
Expand Down Expand Up @@ -45,6 +45,13 @@ test('report element that declared pointer-events', async () => {
DIV#foo
`)

if(!isJsdomEnv()) {
// In the browser `window.getComputedStyle` includes inherited styles.
// Therefore we can not distinguish between inherited `pointer-events` declarations
// and those applied to the element itself.
return
}

expect(() =>
assertPointerEvents(
setupInstance(),
Expand Down

0 comments on commit 4ab1c71

Please sign in to comment.