jest-preset-preact icon indicating copy to clipboard operation
jest-preset-preact copied to clipboard

ReferenceError: regeneratorRuntime is not defined if use async test

Open pontakornth opened this issue 2 years ago • 1 comments

I think I setup something wrong. I created the project using Vite and using this template.

Steps to reproduce

  1. Set up an async test
  2. Try to run test with jest command

Expected Behavior

Tests should run fine.

Actual Behavior

This error. ReferenceError: regeneratorRuntime

Note

I tried to use babel and add configuration file and tried to install regenerator-runtime. They do nothing.

Edit 1: I need to import regenerator-runtime manually. Actually, I expect that it should work without manual import.

pontakornth avatar Sep 12 '21 10:09 pontakornth