From 9c85a25c02e83ad16e1561d02c8ede652f0ef15b Mon Sep 17 00:00:00 2001 From: Murat Kirazkaya <77299279+GroophyLifefor@users.noreply.github.com> Date: Sat, 14 Feb 2026 20:25:36 +0300 Subject: [PATCH] Remove duplicate tests in res.location and res.jsonp (#6996) * test: remove duplicated tests * test: fix typo in data URI encoding test description --- test/res.jsonp.js | 14 -------------- test/res.location.js | 14 +------------- 2 files changed, 1 insertion(+), 27 deletions(-) diff --git a/test/res.jsonp.js b/test/res.jsonp.js index c1f90f11..e043a3b0 100644 --- a/test/res.jsonp.js +++ b/test/res.jsonp.js @@ -327,18 +327,4 @@ describe('res', function(){ }) }) }) - - it('should not override previous Content-Types', function(done){ - var app = express(); - - app.get('/', function(req, res){ - res.type('application/vnd.example+json'); - res.jsonp({ hello: 'world' }); - }); - - request(app) - .get('/') - .expect('content-type', 'application/vnd.example+json; charset=utf-8') - .expect(200, '{"hello":"world"}', done) - }) }) diff --git a/test/res.location.js b/test/res.location.js index b81c6f07..a5ceed76 100644 --- a/test/res.location.js +++ b/test/res.location.js @@ -46,19 +46,7 @@ describe('res', function(){ .expect(200, done) }) - it('should encode data uri1', function (done) { - var app = express() - app.use(function (req, res) { - res.location('data:text/javascript,export default () => { }').end(); - }); - - request(app) - .get('/') - .expect('Location', 'data:text/javascript,export%20default%20()%20=%3E%20%7B%20%7D') - .expect(200, done) - }) - - it('should encode data uri2', function (done) { + it('should encode data uri', function (done) { var app = express() app.use(function (req, res) { res.location('data:text/javascript,export default () => { }').end();