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

* test: remove duplicated tests

* test: fix typo in data URI encoding test description
This commit is contained in:
Murat Kirazkaya
2026-02-14 20:25:36 +03:00
committed by GitHub
parent 1140301f6a
commit 9c85a25c02
2 changed files with 1 additions and 27 deletions

View File

@@ -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)
})
})

View File

@@ -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();