Skip to content

Releases: Tabueeee/puppeteer-request-spy

RequestModifier And Async Options

10 Oct 18:09
05bb124
Compare
Choose a tag to compare

Features

  • added RequestModifier for request overrides
  • allow asynchronous fakes and overrides
  • allow callbacks for fakes and overrides
  • new type of ResponseFaker: ResponseModifier (load and modify request)
  • new type of RequestModifier: RequestRedirector (redirect url of request)

Fixed Errors in Readme

10 Aug 16:34
98fd638
Compare
Choose a tag to compare
  • fixed two errors in readme api usage

credit to Oleg Artene for reporting and fixing the issue in #11

Customizeable Request matching

20 Jan 13:00
Compare
Choose a tag to compare

Feature
Interfaces allow you to create your own Request- Spy/Faker/Blocker to filter responses further or map responses to requests by headers like method.

Changes

  • added new class RequestBlocker for more control of which requests are blocked
  • introduced interfaces for Request- Spy/Faker/Blocker
  • If a request matches is now determined by the Request- Spy/Faker/Blocker
  • updated documentation, types and examples
  • simplified build-steps
  • added contributing information to the repository

Matching Requests from RequestSpy

06 Jan 13:34
Compare
Choose a tag to compare

feature

RequestSpy can now be used to get matching Requests and query them and their responses for further assertions.

Changes

  • Minor performance improvement by caching how url should be accessed depending on puppeteer version
  • RequestSpy now exposes a function to get all matched Requests
  • Minor refactoring in preparation of future feature releases
  • Updated typings
  • Improved examples
  • Updated documentation (to account for puppeteer's API changes)

Bugfix

21 May 16:17
Compare
Choose a tag to compare
  • fixed timeout issue when there are no urls to block added
  • added new test to avoid recurrence of issue #4
  • minor improvements to documentation

credit to Jakub Mucha for reporting and fixing the issue in #5

Bugfix and Documentation

07 May 19:28
Compare
Choose a tag to compare

Changes

  • fixed _this reference error; occured depending on ecmascript version / typescript target
  • updated typescript type definitions
  • improved examples
  • improved documentation

Faking responses of intercepted requests

28 Apr 21:12
Compare
Choose a tag to compare

feature

The ResponseFaker can be used to replace the response of any request intercepted by puppeteer.

improvement

  • improved build
  • added badges
  • updated documentation

Support new puppeteer versions

28 Apr 19:09
5b29437
Compare
Choose a tag to compare

changes:

  • fixed RequestInterceptor not matching correct url in new puppeteer versions