我需要在我的测试中使用React Testing Library和Jest模拟不同的窗口大小。目前,我必须在每个测试文件中都有这个beforeAll: import matchMediaPolyfill from 'mq-polyfill';
matchMediaPolyfillsizes', async () => { // actual test here 我能有一个全局的
我正在使用jest为node.js应用程序编写一些测试。我有一个服务器server.js和一个测试文件server.test.js。/pos-ClientJS.js'); 为了访问函数,我必须对其进行测试。当我运行我的测试时,我得到以下控制台输出: Jest did not exit one second after the test run has completed.Consider running <