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

Can't run vitest tests with @nuxt/test-utils-edge #14975

Closed
smakhtin opened this issue Sep 21, 2022 · 0 comments · Fixed by nuxt/framework#7712
Closed

Can't run vitest tests with @nuxt/test-utils-edge #14975

smakhtin opened this issue Sep 21, 2022 · 0 comments · Fixed by nuxt/framework#7712

Comments

@smakhtin
Copy link

Environment

Nuxt project info: 09:43:17


  • Operating System: Linux
  • Node Version: v16.17.0
  • Nuxt Version: 3.0.0-rc.10
  • Nitro Version: 0.5.3
  • Package Manager: yarn@1.22.19
  • Builder: vite
  • User Config: -
  • Runtime Modules: -
  • Build Modules: -

Reproduction

import { describe, it, expect } from 'vitest'
import { setup } from '@nuxt/test-utils-edge'

describe('My test', async () => {
  await setup({ dev: true })

  it('my test', () => {
    expect(1 + 1).toEqual(2)
  })
})

npx nuxi test

Describe the bug

When running npx nuxi test I'm getting:

Error: test() and it() is only available in test mode.

Additional context

No response

Logs

No response

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

Successfully merging a pull request may close this issue.

2 participants