-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
`spdy` is effectively unmaintained, and as a consequence of an implementation that extensively relies on Node’s non-public APIs, broken on Node 10 and above. In those cases, only https will be used for now. Once express supports Node's built-in HTTP/2 support, migrating over to that should be the best way to go. Fixes: #1449 Fixes: nodejs/node#21665
- Loading branch information
Showing
2 changed files
with
48 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
'use strict'; | ||
|
||
const path = require('path'); | ||
const request = require('supertest'); | ||
const helper = require('./helper'); | ||
const config = require('./fixtures/contentbase-config/webpack.config'); | ||
require('mocha-sinon'); | ||
|
||
const contentBasePublic = path.join(__dirname, 'fixtures/contentbase-config/public'); | ||
|
||
describe('HTTPS', function testHttps() { | ||
let server; | ||
let req; | ||
afterEach(helper.close); | ||
|
||
// Increase the timeout to 20 seconds to allow time for key generation. | ||
this.timeout(20000); | ||
|
||
describe('to directory', () => { | ||
before((done) => { | ||
server = helper.start(config, { | ||
contentBase: contentBasePublic, | ||
https: true | ||
}, done); | ||
req = request(server.app); | ||
}); | ||
|
||
it('Request to index', (done) => { | ||
req.get('/') | ||
.expect(200, /Heyo/, done); | ||
}); | ||
}); | ||
}); |