作者热门文章
- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
在我迁移到 Angular 13 和 Jest 28 之后,我的测试停止了。我收到这种错误:
Test suite failed to run
TypeError: configSet.processWithEsbuild is not a function
> 1 | import { ChangeDetectionStrategy, Component, ChangeDetectorRef, OnChanges, SimpleChanges, OnInit, Input } from '@angular/core';
标记红色i
进口信
关于如何修复它有任何想法吗?
最佳答案
在 Jest 配置中,在 transform
部分将值 ts-jest
更改为 jest-preset-angular
即之前:
transform: {
'^.+\\.(ts|js|html)$': 'ts-jest'
},
之后
transform: {
'^.+\\.(ts|js|html)$': 'jest-preset-angular'
},
关于angular - TypeError : configSet. processWithEsbuild 不是函数,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/72517003/
在我迁移到 Angular 13 和 Jest 28 之后,我的测试停止了。我收到这种错误: Test suite failed to run TypeError: configSet.pro
我是一名优秀的程序员,十分优秀!