Comparing version 0.2.0 to 0.2.2
@@ -1,1 +0,1 @@ | ||
export declare const version = "0.2.0"; | ||
export declare const version = "0.2.2"; |
'use strict'; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.version = '0.2.0'; | ||
exports.version = '0.2.2'; | ||
//# sourceMappingURL=version.js.map |
@@ -21,3 +21,3 @@ 'use strict'; | ||
const redirected = !!_extra.redirected || false; | ||
const url = !!_extra.url || ''; | ||
const url = _extra.url || ''; | ||
Object.defineProperties(this, { | ||
@@ -24,0 +24,0 @@ headers: { |
@@ -16,3 +16,4 @@ 'use strict'; | ||
const cert = fs_1.readFileSync(__dirname + "/../../../certs/cert.pem"); | ||
describe('context', () => { | ||
describe('context', function () { | ||
this.timeout(500); | ||
describe('options', () => { | ||
@@ -54,4 +55,3 @@ it('should be able to overwrite default user agent', async () => { | ||
}); | ||
describe('network settings', function () { | ||
this.timeout(200); | ||
describe('network settings', () => { | ||
it('should not be able to connect over unauthorized ssl', async () => { | ||
@@ -70,3 +70,3 @@ const { server, port } = await server_1.makeServer({ | ||
catch (err) { | ||
chai_1.expect(err.message).to.contain('prematurely closed'); | ||
chai_1.expect(err.message).to.contain('closed'); | ||
} | ||
@@ -73,0 +73,0 @@ disconnectAll(); |
@@ -342,2 +342,11 @@ 'use strict'; | ||
}); | ||
describe('response', () => { | ||
it('should have a proper url', async () => { | ||
const { server, port } = await server_1.makeServer(); | ||
const url = `http://localhost:${port}/headers`; | ||
const response = ensureStatusSuccess(await _1.fetch(url)); | ||
chai_1.expect(response.url).to.equal(url); | ||
await server.shutdown(); | ||
}); | ||
}); | ||
//# sourceMappingURL=index.js.map |
'use strict' | ||
export const version = '0.2.0'; | ||
export const version = '0.2.2'; |
@@ -78,3 +78,3 @@ 'use strict' | ||
const redirected = !!_extra.redirected || false; | ||
const url = !!_extra.url || ''; | ||
const url = _extra.url || ''; | ||
@@ -81,0 +81,0 @@ Object.defineProperties( this, { |
{ | ||
"name": "fetch-h2", | ||
"version": "0.2.0", | ||
"version": "0.2.2", | ||
"description": "HTTP/2-only Fetch API client for Node.js", | ||
@@ -5,0 +5,0 @@ "author": "Gustaf Räntilä", |
@@ -37,4 +37,6 @@ 'use strict'; | ||
describe( 'context', ( ) => | ||
describe( 'context', function( ) | ||
{ | ||
this.timeout( 500 ); | ||
describe( 'options', ( ) => | ||
@@ -105,6 +107,4 @@ { | ||
describe( 'network settings', function( ) | ||
describe( 'network settings', ( ) => | ||
{ | ||
this.timeout( 200 ); | ||
it( 'should not be able to connect over unauthorized ssl', async ( ) => | ||
@@ -128,3 +128,3 @@ { | ||
{ | ||
expect( err.message ).to.contain( 'prematurely closed' ); | ||
expect( err.message ).to.contain( 'closed' ); | ||
} | ||
@@ -131,0 +131,0 @@ |
@@ -614,1 +614,17 @@ 'use strict'; | ||
} ); | ||
describe( 'response', ( ) => | ||
{ | ||
it( 'should have a proper url', async ( ) => | ||
{ | ||
const { server, port } = await makeServer( ); | ||
const url = `http://localhost:${port}/headers`; | ||
const response = ensureStatusSuccess( await fetch( url ) ); | ||
expect( response.url ).to.equal( url ); | ||
await server.shutdown( ); | ||
} ); | ||
} ); |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
676418
6067