Add output objects to recorder #148

Merged
merged 2 commits into from Feb 22, 2014

Projects

None yet

2 participants

@ierceg
Collaborator
ierceg commented Feb 22, 2014

I ddded outputting of objects in recorder instead of generated code. This allows for custom code generators (e.g. CoffeeScript) or for persistence of tests as JSON for bulk loading (instead of defining them in code) like nano does in its tests (though the output object structure I used is different from it).

I also fixed the missing port from the recorder output.

The changes are backward compatible so recorder.rec(), recorder.rec(false) and recorder.rec(true) will work as before but I also added an alternative syntax of:

nock.recorder.rec({
    dont_print: true
});
ierceg added some commits Feb 22, 2014
@ierceg ierceg Added output_objects option for recording
The “output_objects” option forces recorder to output objects instead
of strings (see README for details)
Fixed the missing port from recorder output
Added tests for output_objects option
438b83a
@ierceg ierceg Update README.md b2fc8be
@svnlto svnlto merged commit b464667 into node-nock:master Feb 22, 2014

1 check passed

default The Travis CI build passed
Details
@svnlto
Collaborator
svnlto commented Feb 22, 2014

Thanks!

@ierceg ierceg deleted the unknown repository branch Feb 22, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment