Skip to content
Myr

refactoring tsts

Before adoption: this commit came in with the history the project adopted, so no landing records it.

authored by Tj Holowaychuk · committed by Tj Holowaychuk · parent 3661922 · Browse files · 1 file+29 added−5 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

1 file+29 added−5 removed

  • tests:+29 added−5 removed

1 file+29 added−5 removed

modified:test/response.test.js+29 added-5 removed
50 unmodified lines
51 });5253 assert.response(app,54 { url: '/html' },55 { body: '<p>test</p>', headers: { 'Content-Language': 'en', 'Content-Type': 'text/html' }});55 { body: '<p>test</p>'56 , headers: {57 'Content-Language': 'en'58 , 'Content-Type': 'text/html'59 }});6061 assert.response(app,62 { url: '/json' },58 { body: '{"foo":"bar"}', status: 201, headers: { 'Content-Type': 'application/json', 'X-Foo': 'baz' }});63 { body: '{"foo":"bar"}'64 , status: 20165 , headers: {66 'Content-Type': 'application/json'67 , 'X-Foo': 'baz'68 }});6970 assert.response(app,71 { url: '/jsonp?callback=test' },62 { body: 'test({"foo":"bar"});', status: 201, headers: { 'Content-Type': 'text/javascript', 'X-Foo': 'baz' }});72 { body: 'test({"foo":"bar"});'73 , status: 20174 , headers: {75 'Content-Type': 'text/javascript'76 , 'X-Foo': 'baz'77 }});7879 assert.response(app,80 { url: '/jsonp?callback=baz' },66 { body: 'baz({"foo":"bar"});', status: 201, headers: { 'Content-Type': 'text/javascript', 'X-Foo': 'baz' }});81 { body: 'baz({"foo":"bar"});'82 , status: 201, headers: {83 'Content-Type': 'text/javascript'84 , 'X-Foo': 'baz'85 }});8687 assert.response(app,88 { url: '/jsonp?callback=invalid()[]' },70 { body: 'invalid({"foo":"bar"});', status: 201, headers: { 'Content-Type': 'text/javascript', 'X-Foo': 'baz' }});89 { body: 'invalid({"foo":"bar"});'90 , status: 20191 , headers: {92 'Content-Type': 'text/javascript'93 , 'X-Foo': 'baz'94 }});9596 assert.response(app,97 { url: '/json?callback=test' },98 { body: '{"foo":"bar"}', status: 201, headers: { 'Content-Type': 'application/json', 'X-Foo': 'baz' }});
394 unmodified lines