Accessing the jest global in ESM must be done either through import.meta.jest or by importing it from @jest/globals. The latter is useful while migrating to ESM because the former is not accessible in non-ESM.
This adds an option to specify the types of globals for which we want to enforce the import.
Accessing the
jest
global in ESM must be done either throughimport.meta.jest
or by importing it from@jest/globals
. The latter is useful while migrating to ESM because the former is not accessible in non-ESM.This adds an option to specify the types of globals for which we want to enforce the import.