Skip to content
Myr

Remove duplicate tests in res.location and res.jsonp (#6996)

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

* test: remove duplicated tests * test: fix typo in data URI encoding test description

authored by Murat Kirazkaya · committed by GitHub · parent 1140301 · Browse files · 2 files+1 added−27 removed
This commit

State

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

Diff stats

2 files+1 added−27 removed

  • tests:+1 added−27 removed

2 files+1 added−27 removed

modified:test/res.jsonp.js-14 removed
325 unmodified lines
326 .expect(200, '{\n "name": "tobi",\n "age": 2\n}', done)327 })328 })329 })330331 it('should not override previous Content-Types', function(done){332 var app = express();333334 app.get('/', function(req, res){335 res.type('application/vnd.example+json');336 res.jsonp({ hello: 'world' });337 });338339 request(app)340 .get('/')341 .expect('content-type', 'application/vnd.example+json; charset=utf-8')342 .expect(200, '{"hello":"world"}', done)343 })330})
modified:test/res.location.js+1 added-13 removed
44 unmodified lines
45 .expect('Location', 'https://google.com?q=%E2%98%83%20%C2%A710')46 .expect(200, done)47 })4849 it('should encode data uri1', function (done) {49 it('should encode data uri', function (done) {50 var app = express()51 app.use(function (req, res) {52 res.location('data:text/javascript,export default () => { }').end();53 });
3 unmodified lines
57 .expect('Location', 'data:text/javascript,export%20default%20()%20=%3E%20%7B%20%7D')58 .expect(200, done)59 })6061 it('should encode data uri2', function (done) {62 var app = express()63 app.use(function (req, res) {64 res.location('data:text/javascript,export default () => { }').end();65 });6667 request(app)68 .get('/')69 .expect('Location', 'data:text/javascript,export%20default%20()%20=%3E%20%7B%20%7D')70 .expect(200, done)71 })7261 it('should consistently handle non-string input: boolean', function (done) {62 var app = express()63 app.use(function (req, res) {64 res.location(true).end();
240 unmodified lines