From d9d57d71dd68f2969aa3ffbc924c876da9dc16af Mon Sep 17 00:00:00 2001 From: Victor Berchet Date: Wed, 5 Oct 2016 16:36:11 -0700 Subject: [PATCH] refactor(http): move one Headers test inside the main describe --- modules/@angular/http/test/headers_spec.ts | 26 ++++++++++------------ 1 file changed, 12 insertions(+), 14 deletions(-) diff --git a/modules/@angular/http/test/headers_spec.ts b/modules/@angular/http/test/headers_spec.ts index 3744f6c10c..2a1f8068bf 100644 --- a/modules/@angular/http/test/headers_spec.ts +++ b/modules/@angular/http/test/headers_spec.ts @@ -39,7 +39,6 @@ export function main() { }); }); - describe('.set()', () => { it('should clear all values and re-set for the provided key', () => { const headers = new Headers({'foo': 'bar'}); @@ -143,20 +142,19 @@ export function main() { expect(JSON.stringify(parsedHeaders)).toEqual(JSON.stringify(recreatedHeaders)); }); }); - }); - describe('.fromResponseHeaderString()', () => { - - it('should parse a response header string', () => { - const response = `Date: Fri, 20 Nov 2015 01:45:26 GMT\n` + - `Content-Type: application/json; charset=utf-8\n` + - `Transfer-Encoding: chunked\n` + - `Connection: keep-alive`; - const headers = Headers.fromResponseHeaderString(response); - expect(headers.get('Date')).toEqual('Fri, 20 Nov 2015 01:45:26 GMT'); - expect(headers.get('Content-Type')).toEqual('application/json; charset=utf-8'); - expect(headers.get('Transfer-Encoding')).toEqual('chunked'); - expect(headers.get('Connection')).toEqual('keep-alive'); + describe('.fromResponseHeaderString()', () => { + it('should parse a response header string', () => { + const response = `Date: Fri, 20 Nov 2015 01:45:26 GMT\n` + + `Content-Type: application/json; charset=utf-8\n` + + `Transfer-Encoding: chunked\n` + + `Connection: keep-alive`; + const headers = Headers.fromResponseHeaderString(response); + expect(headers.get('Date')).toEqual('Fri, 20 Nov 2015 01:45:26 GMT'); + expect(headers.get('Content-Type')).toEqual('application/json; charset=utf-8'); + expect(headers.get('Transfer-Encoding')).toEqual('chunked'); + expect(headers.get('Connection')).toEqual('keep-alive'); + }); }); }); }