Skip to content
This repository has been archived by the owner on May 22, 2024. It is now read-only.

The it is a global #327

Open
moltar opened this issue Sep 8, 2023 · 0 comments
Open

The it is a global #327

moltar opened this issue Sep 8, 2023 · 0 comments

Comments

@moltar
Copy link

moltar commented Sep 8, 2023

Runner expects it to be available in the global scope global.it.

This fails under Vitest, which expects it to be imported explicitly, just like any other function.

import { describe, it } from 'vitest'

https://github.com/oclif/fancy-test/blob/08ef27c96c5a94820131a259e143c0eed5884c4e/src/base.ts#L5C1-L9

A workaround is to force Vitest to use globals:

vitest --globals
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant