fancy-test icon indicating copy to clipboard operation
fancy-test copied to clipboard

The `it` is a global

Open moltar opened this issue 2 years ago • 0 comments

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

moltar avatar Sep 08 '23 16:09 moltar