μ λλ©μ΄μ μ΄ λ€μ΄κ° View μ»΄ν¬λνΈλ₯Ό ν μ€ν νλλ° μ΄ μλ¬κ° λ°μνλ€..
ReferenceError: You are trying to `import` a file after the Jest environment has been torn down
ν΄κ²°λ°©λ²
jest.useFakeTimers();
we enable fake timers by calling jest.useFakeTimers();. This mocks out setTimeout and other timer functions with mock functions. If running multiple tests inside of one file or describe block, jest.useFakeTimers()
; can be called before each test manually or with a setup function such as beforeEach
. Not doing so will result in the internal usage counter not being reset.
(beforeEachλ ν
μ€νΈκ° μ€νλκΈ° μ μ μ΄κΈ°ν μμΌμ£Όλ κΈ°λ₯μ νλ€.)