我正在开发一个Typescript库,并尝试用Jest和Puppeteer编写测试。测试失败是因为ReferenceError: Blob is not defined。我遵循了Jest和Jest-Puppeteer的入门部分,但仍然遇到这个问题。如果测试在浏览器中运行,怎么能不定义Blob呢?我能做些什么来解决这个问题呢?# jest.config.js preset: 'jest-puppeteer',
tra
我有jest和jest-puppeteer设置来运行测试。/Users/obihill/.npm/_logs/2020-04-23T12_18_23_546Z-debug.log 在做了一些研究之后,我发现这是因为一些测试可能会失败。我遇到的问题是,我需要运行这个测试,然后按顺序运行第二个测试: npm run test:jest && npm run test:postjest 但是由于失败的测
尝试使用puppeteer设置typescript jest I按照下面提到的步骤进行操作 Jest-puppeteer with typescript configuration 有一个简单的测试google" text on page', async () => { })}) 当我运行我的测试时,我得到奇怪的错误 ReferenceError: page is not defined 并且