reactjs - mocking a function in jest to test in typescript
问题描述
// file to be mocked.ts
export function Details(): void {name=x;email=y}
I want to mock this function in my test file so that I can change the name and email in mocked function in typescript
解决方案
推荐阅读
- python - 填充二维数组以计算两个 linspaces 的函数
- amazon-web-services - 将 AWS EBS 根卷(加密)引导至安全模式
- bash - 在 bash 中使用包含参数列表的变量
- php - php 邮件返回 FALSE 而 error_get_last() 返回 NULL
- powershell - 使用备用 BaseName 查找 (CSV) 名称重命名文件
- android-studio - Webview问题,pdf链接打不开,请帮忙
- python - 如何在python中返回时始终强制调用类方法
- python - 无法使用 Pandas 删除 NaN 值
- python-3.x - 在我的 python 3.6.6 中安装 opencv 时出错
- python - 我已经安装了 pygame。pycharm给了我未安装的pygame