我意识到这个问题已经被问了好几次了,但我遇到的所有解决方案似乎对我都不起作用。在尝试为Vue应用程序运行Jest测试时,我遇到了以下错误。Jest encountered an unexpected token
This usually means that you are trying to import a file which Jest<anonymous>":function(module,export
当我使用jest运行我编写的测试时,我收到了一个意外的错误TypeError: p.replace is not a function PerlRegExp export class PerlRegExpimport { PerlRegExp } from "..", "xig");
const r = p.replace("color-red", "\\u$1")
我在react本机中运行jest测试,但是它失败了,给出了"SyntaxError:意外令牌导入“import React, { Component } from 'reactfrom 'react-redux';失败tests/home-page-test.js测试套件未能运行Jest encountered an u