We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 6f494ad commit 914a5bbCopy full SHA for 914a5bb
src/__tests__/context.test.js
@@ -1,14 +1,18 @@
1
import { expect, test } from 'vitest'
2
+import { VERSION as SVELTE_VERSION } from 'svelte/compiler'
3
4
import { render } from '..'
5
import Comp from './fixtures/Context.svelte'
6
-test('can set a context', () => {
7
- const message = 'Got it'
+test.skipIf(SVELTE_VERSION >= '5' && process.env.VITEST_ENV == 'happy-dom')(
8
+ 'can set a context',
9
+ () => {
10
+ const message = 'Got it'
11
- const { getByText } = render(Comp, {
- context: new Map(Object.entries({ foo: { message } })),
- })
12
+ const { getByText } = render(Comp, {
13
+ context: new Map(Object.entries({ foo: { message } })),
14
+ })
15
- expect(getByText(message)).toBeTruthy()
-})
16
+ expect(getByText(message)).toBeTruthy()
17
+ }
18
+)
0 commit comments