javascript - React-Jest error: node:internalprocesspromises:288 triggerUncaughtException(err, true * fromPromise *); TypeError -

The exact error is as follows:node:internalprocesspromises:288 triggerUncaughtException(err, true *

The exact error is as follows:

node:internal/process/promises:288 
          triggerUncaughtException(err, true /* fromPromise */); 
TypeError: (0, _MyApp.getDataInfo) is not a function

This error occurs when I do

npm test

npm version: 8.19.2 node version: v18.12.1

This error started to occur when I upgraded my existing code from node14 to node18. npm test in package.json: react-scripts test --runInBand --detectOpenHandles

jest version: ^28.1.1 react-script: ^5.0.0

Tried adding async and await in multiple test cases but that didn't work.

发布者:admin,转转请注明出处:http://www.yc00.com/questions/1745573216a4633807.html

相关推荐

发表回复

评论列表(0条)

  • 暂无评论

联系我们

400-800-8888

在线咨询: QQ交谈

邮件:admin@example.com

工作时间:周一至周五,9:30-18:30,节假日休息

关注微信