100% test coverage :)

This commit is contained in:
Rob Wu
2016-02-26 18:23:29 +01:00
parent 411e95ac1d
commit 66fdd6e662

View File

@@ -834,4 +834,19 @@ describe('helpFile', function() {
.expect('Access-Control-Allow-Origin', '*')
.expect(200, customHelpText, done);
});
it('GET / with non-existent help file', function(done) {
var customHelpTextPath = path.join(__dirname, 'Some non-existing file.');
cors_anywhere = createServer({
helpFile: customHelpTextPath,
});
cors_anywhere_port = cors_anywhere.listen(0).address().port;
request(cors_anywhere)
.get('/')
.type('text/plain')
.expect('Access-Control-Allow-Origin', '*')
.expect(500, '', done);
});
});