Python
Java
PHP
IOS
Android
Nodejs
JavaScript
Html5
Windows
Ubuntu
Linux
使用 Jest 运行测试库/react-native 时,RNEncryptedStorage 未定义
我正在尝试设置我的反应本机测试环境react native testing library https github com callstack react native testing library和笑话 我的反应本机应用程序使用rea
ReactNative
jestjs
reactnativetestinglibrary
使用 element-ui 和 vue-test-utils 模拟 select
我正在 Vue 中使用 Jest 和 Element ui 在一个包含带有 2 个选项的选择的组件上进行单元测试 我从下拉列表中选择一个选项 然后检查是否已调用某个操作 1 与正常select and optionHTML 标签效果很好 水
javascript
vuejs
jestjs
vuetestutils
elementui
Typescript Jest 说我想要模拟的类型上不存在模拟或模拟返回值
这是我想测试的一个类 Request js import axios AxiosInstance from axios import config from config const axiosSingleton AxiosInstance
typescript
axios
jestjs
mocking
使用 Jest 对依赖于 http 调用的代码进行单元测试的最佳方法?
假设我有一个与 firebase 身份验证系统一起使用的登录和注销功能 一个单元将如何测试这种方法 firebase 应用程序实例被导入并在登录功能中使用 如果需要 代码片段 export function login data retur
javascript
unittesting
mocking
mochajs
jestjs
Jest 无法从导入的类创建对象
In 更改Factory test js我正在导入我想测试的类 如下所示 import ChangesFactory from path to src ChangesFactory 我正在尝试在测试用例中创建一个实例 如下所示 descri
javascript
ECMAScript6
webstorm
jestjs
在 Jest 中使用 Next.Js 测试 Api
我想使用 Jest 为我的 Api 文件编写测试用例 它使用 Next js 我尝试了很多方法 但无法获得任何文件覆盖率 ApiFile js const axios require axios import getConfig from
ReactJS
unittesting
jestjs
Nextjs
reacttestinglibrary
如何使用 React Redux 和 Jest 测试 mapStateToProps?
当我为连接的 React 组件创建一个测试来测试 mapStateToProps 逻辑时 我遇到了一个我不确定如何解决的问题 错误信息 Expected 1 Received undefined 24 it should show prev
javascript
ReactJS
reactredux
jestjs
enzyme
NestJS - 测试套件运行失败无法从“comment/comment.entity.ts”中找到模块“src/article/article.entity”
我需要 Nestjs 和玩笑测试方面的帮助 我是 NestJS 的新手 当我运行测试时 我陷入了 Cannot find module 错误 我正在尝试测试我的服务 当我运行测试时 我收到了错误消息 src article article
typescript
unittesting
Testing
jestjs
NESTJS
直接在 Intellij Idea/WebStorm 中运行笑话测试?
我在用着jest https facebook github io jest 在我的 ReactJS 应用程序中编写测试 到目前为止 要运行我的测试套件 我需要输入 npm test 这是 package npm 中的片段 scripts
unittesting
intellijidea
ReactJS
webstorm
jestjs
参考错误:Jest 环境被拆除后“导入”文件
我是测试反应本机应用程序的新手 我从 Jest 开始 运行名为 App test js 的测试 该测试通过了 但我收到参考错误 You are试图importJest 环境被拆除后的文件 我努力了 jest useFakeTimers an
ReactNative
jestjs
NestJS:如何在 canActivate 中模拟 ExecutionContext
我在模拟 Guard 中间件中的 ExecutionContext 时遇到问题 这是我的 RoleGuard 扩展 JwtGuard Injectable export class RoleGuard extends JwtAuthGuar
unittesting
jestjs
NESTJS
node-fetch 3.0.0 和 jest 给出 SyntaxError: Cannot use import statements Outside a module
我正在尝试升级我的 api 以使用 node fetch 3 0 0 他们的文档中的部分重大更改是 node fetch 现在是一个纯粹的 ESM 模块 https github com node fetch node fetch blob
javascript
nodejs
typescript
jestjs
nodefetch
测试 const 模态组件是否被调用
我有一个页脚组件 上面有几个按钮 所有这些按钮都使用Messageconst 这是一个 antd 模式 消息 jsx import Modal from antd const confirm Modal export const Messa
ReactJS
jestjs
enzyme
antd
jest typescript - 模拟日期构造函数
我试图嘲笑new Date 返回特定日期 下面的代码 const now new Date jest spyOn global Date mockImplementation gt now 给出编译错误 Argument of type g
typescript
unittesting
mocking
jestjs
Spy
jest 无法识别 URL 构造函数抛出的 TypeError
Jest toThrow TypeError 与抛出的 TypeError 不匹配new URL构造函数 这是一个错误还是我做错了什么 笑话版本是29 4 2 测试用例 it throws TypeError when url is inv
javascript
typescript
jestjs
TypeError
tsjest
如何使用 Node.js / Jest 测试 Postgres 而不模拟 pg 导入
我想测试 2 个 SQL 查询 一个 INSERT 和一个 SELECT 我想运行一个调用插入的测试 然后调用选择 这应该从插入返回数据 我找到了一个堆栈溢出帖子 https stackoverflow com questions 5954
nodejs
postgresql
jestjs
如何更改 Jest 中模拟模块中函数的模拟实现
我有一个看起来像这样的 utils 文件 utils js const getNextDate startDate gt moment startDate MMM Do YYYY startOf day add 10 days format
javascript
jestjs
mocking
Jest - “child_process”包中的模拟函数
我正在编写单元测试 并模拟包 child process 中的 exec 方法 mocks child process js const child process jest genMockFromModule child process
unittesting
jestjs
SonarQube 与 Jest 单元测试
我一直在尝试找出如何填充声纳Qube和我的笑话单元测试和 net 单元测试 我有一个本地版本SQ 6 7以及所有最新版本的 Javascript 和 C 插件 说到 Jest 我有sonar jest reporter https www
unittesting
SonarQube
jestjs
查询带有特定文本的按钮
我有一个 开玩笑 测试来确定按钮是否存在 it renders a signup button gt expect sut getByText Sign up for free toBeDefined 此测试是因为组件中有一个按钮和带有 免
ReactJS
jestjs
reacttestinglibrary
«
1 ...
16
17
18
19
20
21
22
...28
»