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

[test-utils] Hanging on windows using useTextContext #15065

Closed
manniL opened this issue Sep 30, 2022 · 2 comments
Closed

[test-utils] Hanging on windows using useTextContext #15065

manniL opened this issue Sep 30, 2022 · 2 comments

Comments

@manniL
Copy link
Member

manniL commented Sep 30, 2022

Environment


  • Operating System: Windows_NT
  • Node Version: v16.14.0
  • Nuxt Version: 3.0.0-rc.11
  • Nitro Version: 0.5.4
  • Package Manager: yarn@1.22.17
  • Builder: vite
  • User Config: -
  • Runtime Modules: -
  • Build Modules: -

Reproduction

Minimal repro: https://github.com/manniL/nuxt-test-utils-vitest-windows
Action (cancelled): https://github.com/manniL/nuxt-test-utils-vitest-windows/actions/runs/3160622271/jobs/5145286074

Also: https://github.com/Developmint/nuxt-purgecss/actions/runs/3160440554/jobs/5144897984

Describe the bug

When using useTestContext() in a test on a windows environment or CI pipeline together with vitest >= v0.22.0, it will finish all tests but never stop the process itself, leading to hours of CI time that will never finish.

import { fileURLToPath } from 'url'
import { it, expect } from 'vitest'
import { setup, useTestContext } from '@nuxt/test-utils'

await setup({
  rootDir: fileURLToPath(new URL('../playground', import.meta.url))
})

it('should finish on windows', () => {
  const _ctx = useTestContext()
  expect(true).toBe(true) // Tests run but it never finishes
})

grafik

Additional context

No response

Logs

No response

@manniL manniL changed the title [Test Utils] Hanging on windows with latest vitest using ctx [test-utils] Hanging on windows using useTextContext Sep 30, 2022
@danielroe
Copy link
Member

I wonder if this is the same root cause as #14472.

@danielroe
Copy link
Member

This is no longer reproducible for me with latest Nuxt.

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

No branches or pull requests

2 participants