Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error following example setup #2

Closed
KieranP opened this issue Sep 16, 2024 · 1 comment
Closed

Error following example setup #2

KieranP opened this issue Sep 16, 2024 · 1 comment

Comments

@KieranP
Copy link

KieranP commented Sep 16, 2024

import { expect, test } from 'vitest'
import { render } from 'vitest-browser-svelte'

import Component from '@components/alerts/alert.svelte'

test('counter button increments the count', async () => {
  const screen = render(Component, {
    heading: 'Hello'
  })

  await expect.element(screen.getByText('Hello')).toBeVisible()
})

gives me this error:

SyntaxError: The requested module '@vitest/browser/context' does not provide an export named 'page'
 ❯ node_modules/vitest-browser-svelte/src/pure.js:2:31
@sheremet-va
Copy link
Member

sheremet-va commented Sep 26, 2024

Make sure you have the browser mode enabled in the config. (Readme is updated to reflect that)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants