【发布时间】:2021-02-12 14:24:57
【问题描述】:
我尝试使用 Bugsnag 在 React-Native 上运行 Jest 单元测试,但出现错误:
The error below may be caused by using the wrong test environment, see https://jestjs.io/docs/en/configuration#testenvironment-string.
Consider using the "jsdom" test environment.
ReferenceError: window is not defined
1 | import React from 'react';
> 2 | import Bugsnag from '@bugsnag/react-native';
【问题讨论】:
标签: react-native unit-testing jestjs bugsnag