mirror of
https://github.com/expressjs/express.git
synced 2026-02-21 19:41:36 +00:00
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:
@@ -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)
|
||||
})
|
||||
})
|
||||
|
||||
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user