Globales
In your test files, Jest puts each of these methods and objects into the global environment. You don't have to require or import anything to use them. However, if you prefer explicit imports, you can do import {describe, expect, test} from '@jest/globals'
.
info
Los ejemplos de TypeScript de esta página sólo funcionarán como documentados si se importan explícitamente APIs de Jest:
import {expect, jest, test} from '@jest/globals';
Consult the Getting Started guide for details on how to setup Jest with TypeScript.