Created
August 18, 2014 20:33
-
-
Save aoberoi/d537926ad55d189775f4 to your computer and use it in GitHub Desktop.
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
Giselle:nock ankur$ node node_modules/tap/bin/tap.js --dd tests | |
TAP version 13 | |
# tests | |
# test_common.js | |
# TAP version 13 | |
# isBinaryBuffer works | |
ok 1 (unnamed assert) | |
ok 2 (unnamed assert) | |
ok 3 (unnamed assert) | |
ok 4 (unnamed assert) | |
# headersFieldNamesToLowerCase works | |
ok 5 should be equal | |
ok 6 should be equal | |
# headersFieldNamesToLowerCase throws on conflicting keys | |
ok 7 should be equal | |
# deleteHeadersField deletes fields with case-insensitive field names | |
ok 8 (unnamed assert) | |
ok 9 (unnamed assert) | |
ok 10 (unnamed assert) | |
ok 11 (unnamed assert) | |
# tests 11 | |
# pass 11 | |
# ok | |
ok 12 tests/test_common.js | |
# test_intercept.js | |
# TAP version 13 | |
# double activation throws exception | |
ok 13 (unnamed assert) | |
ok 14 (unnamed assert) | |
ok 15 should be equal | |
ok 16 (unnamed assert) | |
# 200 '99problems' | |
# allow override works (2) | |
# get gets mocked | |
ok 17 should be equal | |
ok 18 data should be buffer | |
ok 19 response should match | |
ok 20 (unnamed assert) | |
# not mocked should work in http | |
ok 21 should be equal | |
ok 22 (unnamed assert) | |
ok 23 (unnamed assert) | |
# post | |
ok 24 should be equal | |
ok 25 data should be buffer | |
ok 26 response should match | |
ok 27 (unnamed assert) | |
# post with empty response body | |
ok 28 should be equal | |
# post, lowercase | |
ok 29 should be equal | |
# get with reply callback | |
ok 30 response should match | |
# get to different subdomain with reply callback and filtering scope | |
ok 31 response should match | |
# get with reply callback returning object | |
ok 32 response should match | |
# post with reply callback, uri, and request body | |
ok 33 response should match | |
# post with chaining on call | |
ok 34 response should match | |
# reply with callback and filtered path and body | |
ok 35 (unnamed assert) | |
ok 36 should be equal | |
ok 37 response should match | |
# isDone | |
ok 38 not done when a request is outstanding | |
ok 39 should be equal | |
ok 40 done after request is made | |
# requireDone | |
ok 41 done when a requireDone is set to false | |
ok 42 not done when a requireDone is explicitly set to true | |
# request headers exposed | |
ok 43 should be equivalent | |
# headers work | |
ok 44 should be equal | |
ok 45 should be equivalent | |
# match headers | |
ok 46 should be equal | |
ok 47 should be equal | |
# multiple match headers | |
ok 48 should be equal | |
ok 49 should be equal | |
ok 50 should be equal | |
ok 51 should be equal | |
# match headers with regexp | |
ok 52 should be equal | |
ok 53 should be equal | |
# match headers on number with regexp | |
ok 54 should be equal | |
ok 55 should be equal | |
# match headers with function | |
ok 56 should be equal | |
ok 57 should be equal | |
# match all headers | |
ok 58 should be equal | |
ok 59 should be equal | |
ok 60 should be equal | |
ok 61 should be equal | |
# header manipulation | |
ok 62 Custom header was not set | |
ok 63 Custom header was not removed | |
# head | |
ok 64 should be equal | |
# body data is differentiating | |
# A | |
ok 65 should be equal | |
ok 66 data should be buffer | |
ok 67 response should match | |
ok 68 (unnamed assert) | |
# B | |
ok 69 should be equal | |
ok 70 data should be buffer | |
ok 71 response should match | |
ok 72 (unnamed assert) | |
# chaining | |
# post | |
ok 73 should be equal | |
ok 74 data should be buffer | |
ok 75 response should match | |
ok 76 (unnamed assert) | |
# get | |
ok 77 should be equal | |
ok 78 data should be buffer | |
ok 79 response should match | |
ok 80 (unnamed assert) | |
# encoding | |
ok 81 should be equal | |
ok 82 data should be string | |
ok 83 response should match base64 encoding | |
ok 84 (unnamed assert) | |
# reply with file | |
ok 85 should be equal | |
ok 86 response should match | |
ok 87 (unnamed assert) | |
# reply with file and pipe response | |
ok 88 should be equal | |
ok 89 response should match | |
# reply with file with headers | |
ok 90 should be equal | |
ok 91 should be equal | |
ok 92 (unnamed assert) | |
# reply with file with mikeal/request | |
ok 93 should be equal | |
ok 94 response should match | |
# reply with JSON | |
ok 95 should be equal | |
ok 96 should be equal | |
ok 97 response should match | |
ok 98 (unnamed assert) | |
# filter path with function | |
ok 99 should be equal | |
# filter path with regexp | |
ok 100 should be equal | |
# filter body with function | |
ok 101 should be equal | |
ok 102 should be equal | |
# filter body with regexp | |
ok 103 should be equal | |
# abort request | |
ok 104 should be equal | |
# pause response before data | |
ok 105 (unnamed assert) | |
# pause response after data | |
ok 106 (unnamed assert) | |
ok 107 (unnamed assert) | |
# response pipe | |
ok 108 should emit "pipe" event | |
ok 109 should be equal | |
# response pipe without implicit end | |
ok 110 should emit end event | |
# chaining API | |
ok 111 status should be ok | |
ok 112 should be equal to first reply | |
ok 113 status should be ok | |
ok 114 should be qual to second reply | |
# same URI | |
ok 115 should be qual to first reply | |
ok 116 should be qual to second reply | |
# can use hostname instead of host | |
ok 117 should be equal | |
# hostname is case insensitive | |
# can take a port | |
ok 118 should be equal | |
# can use https | |
ok 119 should be equal | |
ok 120 data should be buffer | |
ok 121 response should match | |
ok 122 data event called | |
# emits error if https route is missing | |
ok 123 should be equal | |
# emits error if https route is missing | |
ok 124 should be equal | |
# can use ClientRequest using GET | |
ok 125 should be equal | |
ok 126 data should be buffer | |
ok 127 response should match | |
ok 128 data event was called | |
# can use ClientRequest using POST | |
ok 129 should be equal | |
ok 130 data should be buffer | |
ok 131 response should match | |
ok 132 data event was called | |
# same url matches twice | |
ok 133 should be equal | |
ok 134 should be equal | |
ok 135 should match first request response body | |
ok 136 should match second request response body | |
# scopes are independent | |
ok 137 (unnamed assert) | |
ok 138 (unnamed assert) | |
# two scopes with the same request are consumed | |
# allow unmocked option works | |
ok 139 (unnamed assert) | |
ok 140 Google say it does not exist | |
ok 141 (unnamed assert) | |
ok 142 GET Google Home page | |
# default reply headers work | |
ok 143 should be equivalent | |
# JSON encoded replies set the content-type header | |
ok 144 should be equal | |
ok 145 should be equal | |
# JSON encoded replies does not overwrite existing content-type header | |
ok 146 should be equal | |
ok 147 should be equal | |
# blank response doesn't have content-type application/json attached to it | |
ok 148 should be equal | |
ok 149 should not be equal | |
# clean all works | |
ok 150 should mock before cleanup | |
ok 151 should clean up properly | |
# username and password works | |
# works with mikeal/request and username and password | |
ok 152 error | |
ok 153 (unnamed assert) | |
ok 154 should be equal | |
# different ports work works | |
# different ports work work with Mikeal request | |
ok 155 no error | |
ok 156 should be equal | |
ok 157 (unnamed assert) | |
# explicitly specifiying port 80 works | |
# post with object | |
# accept string as request target | |
ok 158 should be equal | |
ok 159 data should be buffer | |
ok 160 response should match | |
ok 161 (unnamed assert) | |
# request has path | |
ok 162 should have req.path set to /the/path/to/infinity | |
# persists interceptors | |
ok 163 (unnamed assert) | |
ok 164 (unnamed assert) | |
# persist reply with file | |
ok 165 should be equal | |
ok 166 should be equal | |
# (re-)activate after restore | |
ok 167 (unnamed assert) | |
ok 168 (unnamed assert) | |
ok 169 (unnamed assert) | |
ok 170 (unnamed assert) | |
# allow unmocked option works with https | |
ok 171 scope is not done | |
ok 172 real google response status code | |
ok 173 (unnamed assert) | |
ok 174 Google replied to / | |
ok 175 GET Google Home page | |
# allow unmocked post with json data | |
ok 176 should be equal | |
# allow unordered body with json encoding | |
ok 177 should be equal | |
# allow unordered body with form encoding | |
ok 178 should be equal | |
# allow string json spec | |
ok 179 should be equal | |
# has a req property on the response | |
ok 180 req property doesn't exist | |
# disabled real HTTP request | |
ok 181 should be equal | |
# NetConnectNotAllowedError is instance of Error | |
ok 182 type is Error | |
# NetConnectNotAllowedError exposes the stack | |
ok 183 should not be equal | |
# enable real HTTP request only for google.com, via string | |
ok 184 should be equal | |
# enable real HTTP request only for google.com, via regexp | |
ok 185 should be equal | |
# repeating once | |
ok 186 first request | |
# repeating twice | |
ok 187 first request | |
ok 188 first request | |
# repeating thrice | |
ok 189 first request | |
ok 190 first request | |
ok 191 first request | |
# repeating response 4 times | |
ok 192 first request | |
ok 193 first request | |
ok 194 first request | |
ok 195 first request | |
# superagent works | |
ok 196 should be equal | |
# superagent works with query string | |
ok 197 should be equal | |
# superagent posts | |
ok 198 should be equal | |
# response is streams2 compatible | |
ok 199 should be equal | |
# calling delay delays the response | |
ok 200 should be equal | |
ok 201 Duration of 106ms should be longer than 90ms | |
# using reply callback with delay provides proper arguments | |
ok 202 path arg should be set | |
ok 203 requestBody arg should be set | |
# delay works with replyWithFile | |
ok 204 the body should eql the text from the file | |
ok 205 Duration of 103ms should be longer than 90ms | |
# delay works with when you return a generic stream from the reply callback | |
ok 206 the body should eql the text from the file | |
ok 207 Duration of 102ms should be longer than 90ms | |
# finish event fired before end event (bug-139) | |
ok 208 should be equal | |
ok 209 should be equal | |
# when a stream is used for the response body, it will not be read until after the response event | |
ok 210 (unnamed assert) | |
ok 211 should be equal | |
# calling delayConnection delays the connection | |
ok 212 should be equal | |
ok 213 Duration of 103ms should be longer than 90ms | |
# using reply callback with delayConnection provides proper arguments | |
ok 214 path arg should be set | |
ok 215 requestBody arg should be set | |
# delayConnection works with replyWithFile | |
ok 216 the body should eql the text from the file | |
ok 217 Duration of 103ms should be longer than 90ms | |
# delayConnection works with when you return a generic stream from the reply callback | |
ok 218 the body should eql the text from the file | |
ok 219 Duration of 102ms should be longer than 90ms | |
# define() is backward compatible | |
ok 220 (unnamed assert) | |
ok 221 should be equal | |
# define() works with non-JSON responses | |
ok 222 (unnamed assert) | |
ok 223 should be equal | |
ok 224 responses match | |
# define() works with binary buffers | |
ok 225 (unnamed assert) | |
ok 226 should be equal | |
ok 227 responses match | |
# issue #163 - Authorization header isn't mocked | |
ok 228 should be equivalent | |
# define() uses reqheaders | |
ok 229 (unnamed assert) | |
ok 230 should be equal | |
ok 231 should be equivalent | |
# sending binary and receiving JSON should work | |
ok 232 should be equal | |
ok 233 should be equal | |
ok 234 should be equal | |
# fix #146 - resume() is automatically invoked when the response is drained | |
ok 235 should be equal | |
ok 236 (unnamed assert) | |
ok 237 (unnamed assert) | |
ok 238 (unnamed assert) | |
ok 239 should be equal | |
# handles get with restify client | |
ok 240 should be equal | |
# handles post with restify client | |
ok 241 should be equal | |
# handles get with restify JsonClient | |
ok 242 should be equal | |
# handles post with restify JsonClient | |
ok 243 should be equal | |
# handles 404 with restify JsonClient | |
ok 244 should be equal | |
# handles 500 with restify JsonClient | |
ok 245 should be equal | |
# test request timeout option | |
ok 246 should be equal | |
ok 247 should be equal | |
# done fails when specified request header is missing | |
ok 248 (unnamed assert) | |
# done does not fail when specified request header is not missing | |
ok 249 type is null | |
ok 250 should be equal | |
# mikeal/request with delayConnection and request.timeout | |
ok 251 type is Error | |
ok 252 should be equal | |
# get correct filtering with scope and request headers filtering | |
ok 253 should be equivalent | |
ok 254 should be equal | |
ok 255 (unnamed assert) | |
# mocking succeeds even when mocked and specified request header names have different cases | |
ok 256 type is null | |
ok 257 should be equal | |
# mocking succeeds even when host request header is not specified | |
ok 258 type is null | |
ok 259 should be equal | |
# mikeal/request with strictSSL: true | |
ok 260 type is null | |
ok 261 should be equal | |
# response readable pull stream works as expected | |
ok 262 should be equal | |
ok 263 should be equal | |
# .setNoDelay | |
ok 264 should be equal | |
# match basic authentication header | |
ok 265 should be equal | |
ok 266 should be equal | |
# request emits socket | |
ok 267 type is Object | |
ok 268 type is string | |
# socket emits connect and secureConnect | |
ok 269 (unnamed assert) | |
ok 270 (unnamed assert) | |
ok 271 should be equal | |
# socket setKeepAlive | |
# hyperquest works | |
ok 272 should be equal | |
# remove interceptor for GET resource | |
ok 273 should be equivalent | |
ok 274 result should be true | |
ok 275 should be equal | |
ok 276 should be equal | |
# remove interceptor for not found resource | |
ok 277 result should be false as no interceptor was found | |
# tests 265 | |
# pass 265 | |
# ok | |
not ok 278 tests/test_intercept.js | |
--- | |
exit: 143 | |
timedOut: true | |
command: "/usr/local/Cellar/node/0.10.28/bin/node test_intercept.js" | |
... | |
# test_recorder.js | |
# TAP version 13 | |
# recording turns off nock interception (backward compatibility behavior) | |
ok 279 (unnamed assert) | |
ok 280 (unnamed assert) | |
ok 281 (unnamed assert) | |
# records | |
ok 282 should be equal | |
ok 283 should be equal | |
ok 284 type is string | |
ok 285 should be equal | |
# records objects | |
ok 286 should be equal | |
ok 287 should be equal | |
ok 288 type is object | |
ok 289 should be equal | |
ok 290 should be equal | |
ok 291 (unnamed assert) | |
ok 292 (unnamed assert) | |
# checks if callback is specified | |
ok 293 should be equal | |
# when request body is json, it goes unstringified | |
ok 294 (unnamed assert) | |
ok 295 should be equal | |
# when request body is json, it goes unstringified in objects | |
ok 296 (unnamed assert) | |
ok 297 type is object | |
ok 298 should be equal | |
ok 299 should be equal | |
ok 300 (unnamed assert) | |
ok 301 (unnamed assert) | |
ok 302 (unnamed assert) | |
# records nonstandard ports | |
ok 303 should be equal | |
ok 304 should be equal | |
ok 305 should be equal | |
ok 306 type is object | |
ok 307 should be equal | |
ok 308 should be equal | |
ok 309 should be equal | |
ok 310 should be equal | |
ok 311 should be equal | |
# rec() throws when reenvoked with already recorder requests | |
ok 312 should be equal | |
ok 313 should be equal | |
# records https correctly | |
ok 314 should be equal | |
ok 315 should be equal | |
ok 316 type is object | |
ok 317 should be equal | |
ok 318 should be equal | |
ok 319 (unnamed assert) | |
ok 320 (unnamed assert) | |
# records request headers correctly | |
ok 321 should be equal | |
ok 322 should be equal | |
ok 323 type is object | |
ok 324 should be equivalent | |
# records and replays gzipped nocks correctly | |
ok 325 should be equal | |
ok 326 (unnamed assert) | |
ok 327 (unnamed assert) | |
ok 328 (unnamed assert) | |
ok 329 should be equal | |
ok 330 should be equal | |
ok 331 should be equal | |
ok 332 should be equal | |
ok 333 should be equal | |
# records and replays nocks correctly | |
ok 334 should be equal | |
ok 335 (unnamed assert) | |
ok 336 (unnamed assert) | |
ok 337 (unnamed assert) | |
ok 338 should be equal | |
ok 339 should be equal | |
ok 340 should be equal | |
# doesn't record request headers by default | |
ok 341 should be equal | |
ok 342 should be equal | |
ok 343 type is object | |
ok 344 (unnamed assert) | |
# records request headers except user-agent if enable_reqheaders_recording is set to true | |
ok 345 should be equal | |
ok 346 should be equal | |
ok 347 type is object | |
ok 348 (unnamed assert) | |
ok 349 (unnamed assert) | |
# includes query parameters from superagent | |
ok 350 should be equal | |
ok 351 (unnamed assert) | |
ok 352 should be equal | |
# tests 74 | |
# pass 74 | |
# ok | |
ok 353 tests/test_recorder.js | |
1..353 | |
# tests 353 | |
# pass 352 | |
# fail 1 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment