We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Getting following exception:
TypeError: this._resolveReqs is not a function at Object._onReqsCompleted (../node_modules/puppeteer-request-mocker/lib/mocker.js:138:36) at interceptedResponse.text.then.catch.then (../node_modules/puppeteer-request-mocker/lib/handleResponse.js:97:18)
Page just make fetch POST to resource and renders list of posts
My test:
const mocker = require('puppeteer-request-mocker'); const { PendingXHR } = require('pending-xhr-puppeteer'); describe('app', () => { it('should display My Blog logo', async () => { page = await browser.newPage(); const pendingXHR = new PendingXHR(page); await page.goto('http://localhost:3000', {waitUntil: 'domcontentloaded'}) await mocker.start({ page, mockList: ['https://jsonplaceholder.typicode.com/posts'], }); await pendingXHR.waitForAllXhrFinished(); await page.waitForSelector('section'); const sectionCount = await page.evaluate(() => document.querySelectorAll('section').length); console.log('sectionCount: ', sectionCount); await expect(sectionCount).toBe(100); await expect(page).toMatch('My Blog'); await mocker.stop(); }) });
The text was updated successfully, but these errors were encountered:
Hey, I just got the same Error, finally)
Sorry, something went wrong.
No branches or pull requests
Getting following exception:
Page just make fetch POST to resource and renders list of posts
My test:
The text was updated successfully, but these errors were encountered: