Skip to content

Commit 9c85a25

Browse files
Remove duplicate tests in res.location and res.jsonp (#6996)
* test: remove duplicated tests * test: fix typo in data URI encoding test description
1 parent 1140301 commit 9c85a25

File tree

2 files changed

+1
-27
lines changed

2 files changed

+1
-27
lines changed

test/res.jsonp.js

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -327,18 +327,4 @@ describe('res', function(){
327327
})
328328
})
329329
})
330-
331-
it('should not override previous Content-Types', function(done){
332-
var app = express();
333-
334-
app.get('/', function(req, res){
335-
res.type('application/vnd.example+json');
336-
res.jsonp({ hello: 'world' });
337-
});
338-
339-
request(app)
340-
.get('/')
341-
.expect('content-type', 'application/vnd.example+json; charset=utf-8')
342-
.expect(200, '{"hello":"world"}', done)
343-
})
344330
})

test/res.location.js

Lines changed: 1 addition & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -46,19 +46,7 @@ describe('res', function(){
4646
.expect(200, done)
4747
})
4848

49-
it('should encode data uri1', function (done) {
50-
var app = express()
51-
app.use(function (req, res) {
52-
res.location('data:text/javascript,export default () => { }').end();
53-
});
54-
55-
request(app)
56-
.get('/')
57-
.expect('Location', 'data:text/javascript,export%20default%20()%20=%3E%20%7B%20%7D')
58-
.expect(200, done)
59-
})
60-
61-
it('should encode data uri2', function (done) {
49+
it('should encode data uri', function (done) {
6250
var app = express()
6351
app.use(function (req, res) {
6452
res.location('data:text/javascript,export default () => { }').end();

0 commit comments

Comments
 (0)