test: add failing test for JSON-encoded strings stored by recorder#1231
Closed
ctstone wants to merge 1 commit intonock:masterfrom
Closed
test: add failing test for JSON-encoded strings stored by recorder#1231ctstone wants to merge 1 commit intonock:masterfrom
ctstone wants to merge 1 commit intonock:masterfrom
Conversation
gr2m
reviewed
Sep 22, 2018
| t.equal(nock.recorder.play().length, 0); | ||
| var options = { | ||
| method: 'POST' | ||
| , host: 'google.com' |
Member
Author
|
Makes sense! Maybe consider adding a comment to existing test cases that use external servers so that that behavior is not copied to new tests?
|
Member
That’s a great idea! Will do! /cc @RichardLitt |
Member
|
Agreed! @ctstone Any chance you want to help log those comments, so that we know where you took the example from? |
|
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. |
Member
gr2m
pushed a commit
that referenced
this pull request
May 8, 2019
gr2m
pushed a commit
that referenced
this pull request
Sep 4, 2019
gr2m
pushed a commit
that referenced
this pull request
Sep 4, 2019
gr2m
pushed a commit
that referenced
this pull request
Sep 5, 2019
juninmd
pushed a commit
to juninmd/nock
that referenced
this pull request
Mar 21, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Failing test is
'records objects and correctly stores JSON string in body'. See discussion in #1229.POST body is
"foo", a JSON string, but the request is stored as a string literal,foo. When the object is loaded, it fails to match, and the stored response is not served.