question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Option to record only "unmatched" requests from a batch?

See original GitHub issue

Sometimes on my test this situation happens:

  it...

    nock.recorder.rec()
    do_something()
    nock.restore()

  assert...
  assert...

The problem is sometimes the function do_something() will do 3 requests in a row and i just want to record the second request or third request.

I could temporarily add nock.recorder.rec() somewhere in my code during debug but it would be easier if i could for instance only record requests which have no match?

Something like

nock.recorder.rec( { unmatched_only: true } )

Does this option exist or a workaround for this situation exists?

Issue Analytics

  • State:open
  • Created 5 years ago
  • Comments:7 (3 by maintainers)

github_iconTop GitHub Comments

2reactions
guerrerocarloscommented, Oct 4, 2018

Hi @gr2m, I created a PR so that the record mode intercepts the existing fixtures previously recorded and at the same time, records new requests that don’t have a matching fixture.

0reactions
stale[bot]commented, Jan 2, 2019

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. We try to do our best, but nock is maintained by volunteers and there is only so much we can do at a time. Thank you for your contributions.

Read more comments on GitHub >

github_iconTop Results From Across the Web

AcceptUnmatchedRecordsAsUni...
AcceptUnmatchedRecordsAsUnique changes the state of records that have no match candidates from Unmerged to Consolidated (unique). Once a record is in the ...
Read more >
Batch Processes
This batch process sweeps the action staging table and creates debit memos, credit memos, and credit note requests as needed. Only a single...
Read more >
Census Geocoder Frequently Asked Questions
Can I process more than 10,000 addresses using Batch Address ... create a separate batch of only the unmatched address records and resubmit....
Read more >
Fiddler In Action: Mocking And Manipulating API Behavior ...
Unfortunately, this is exactly what we need to do. There is no option to “batch”-map a whole parent path to recorded responses on...
Read more >
Batch load data using the Storage Write API | BigQuery
For each stream, call AppendRows in a loop to write batches of records. ... Since this is the second request, you only need...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found