@@ -9,7 +9,7 @@ var expect = require('chai').expect,
99describe ( 'getSnippetHeaders function' , function ( ) {
1010
1111 it ( 'should generate headers declaration snippet' , function ( ) {
12- const expected = 'headers = c(\n \'"1"\' = \'\\\'a\\\'\',\n \'"2"\' = \'"b"\'\n)\n' ,
12+ const expected = 'headers = c(\n \'"1"\' = \'\\\'a\\\'\',\n \'"2"\' = \'"b"\'\n)\n\n ' ,
1313 res = getSnippetHeaders ( [ { key : '"1"' , value : '\'a\'' } , { key : '"2"' , value : '"b"' } ] , ' ' ) ;
1414 expect ( res ) . to . equal ( expected ) ;
1515 } ) ;
@@ -21,7 +21,7 @@ describe('getSnippetHeaders function', function () {
2121 } ) ;
2222
2323 it ( 'should generate headers declaration snippet with empty indentation' , function ( ) {
24- const expected = 'headers = c(\n\'"1"\' = \'\\\'a\\\'\',\n\'"2"\' = \'"b"\'\n)\n' ,
24+ const expected = 'headers = c(\n\'"1"\' = \'\\\'a\\\'\',\n\'"2"\' = \'"b"\'\n)\n\n ' ,
2525 res = getSnippetHeaders ( [ { key : '"1"' , value : '\'a\'' } , { key : '"2"' , value : '"b"' } ] , '' ) ;
2626 expect ( res ) . to . equal ( expected ) ;
2727 } ) ;
@@ -32,14 +32,14 @@ describe('getSnippetFromMethod function', function () {
3232
3333 it ( 'should generate postForm snippet with params headers and post style' , function ( ) {
3434 const expected = 'res <- VERB("POST", url = "https://postman-echo.com/post", ' +
35- 'body = body, add_headers(headers), encode = \'form\')\n' ,
35+ 'body = body, add_headers(headers), encode = \'form\')\n\n ' ,
3636 res = getSnippetFromMethod ( 'https://postman-echo.com/post' , true , true , 'POST' , 'urlencoded' ) ;
3737 expect ( res ) . to . equal ( expected ) ;
3838 } ) ;
3939
4040 it ( 'should generate postForm snippet without params with headers and post style' , function ( ) {
4141 const expected = 'res <- VERB("POST", url = "https://postman-echo.com/post", ' +
42- 'add_headers(headers), encode = \'form\')\n' ,
42+ 'add_headers(headers), encode = \'form\')\n\n ' ,
4343 res = getSnippetFromMethod (
4444 'https://postman-echo.com/post' ,
4545 false ,
@@ -52,7 +52,7 @@ describe('getSnippetFromMethod function', function () {
5252
5353 it ( 'should generate postForm snippet without params with headers and post style' , function ( ) {
5454 const expected = 'res <- VERB("POST", url = "https://postman-echo.com/post", ' +
55- 'add_headers(headers), encode = \'form\', timeout(3))\n' ,
55+ 'add_headers(headers), encode = \'form\', timeout(3))\n\n ' ,
5656 res = getSnippetFromMethod (
5757 'https://postman-echo.com/post' ,
5858 false ,
@@ -66,19 +66,19 @@ describe('getSnippetFromMethod function', function () {
6666
6767 it ( 'should generate GET snippet with params headers' , function ( ) {
6868 const expected = 'res <- VERB("GET", url = "https://postman-echo.com/headers", ' +
69- 'add_headers(headers))\n' ,
69+ 'add_headers(headers))\n\n ' ,
7070 res = getSnippetFromMethod ( 'https://postman-echo.com/headers' , false , true , 'GET' , undefined , undefined ) ;
7171 expect ( res ) . to . equal ( expected ) ;
7272 } ) ;
7373
7474 it ( 'should generate GET snippet without headers' , function ( ) {
75- const expected = 'res <- VERB("GET", url = "https://postman-echo.com/headers")\n' ,
75+ const expected = 'res <- VERB("GET", url = "https://postman-echo.com/headers")\n\n ' ,
7676 res = getSnippetFromMethod ( 'https://postman-echo.com/headers' , false , false , 'GET' , undefined , undefined ) ;
7777 expect ( res ) . to . equal ( expected ) ;
7878 } ) ;
7979
8080 it ( 'should generate GET snippet with timeout' , function ( ) {
81- const expected = 'res <- VERB("GET", url = "https://postman-echo.com/headers", timeout(3))\n' ,
81+ const expected = 'res <- VERB("GET", url = "https://postman-echo.com/headers", timeout(3))\n\n ' ,
8282 res = getSnippetFromMethod ( 'https://postman-echo.com/headers' , false , false , 'GET' , undefined , 3 ) ;
8383 expect ( res ) . to . equal ( expected ) ;
8484 } ) ;
@@ -88,7 +88,7 @@ describe('getSnippetFromMethod function', function () {
8888describe ( 'getSnippetRequest function' , function ( ) {
8989
9090 it ( 'should generate snippet method GET with headers' , function ( ) {
91- const expected = 'res <- VERB("GET", url = "https://postman-echo.com/headers", add_headers(headers))\n' ,
91+ const expected = 'res <- VERB("GET", url = "https://postman-echo.com/headers", add_headers(headers))\n\n ' ,
9292 res = getSnippetRequest ( {
9393 url : 'https://postman-echo.com/headers' ,
9494 method : 'GET' ,
@@ -99,7 +99,7 @@ describe('getSnippetRequest function', function () {
9999 } ) ;
100100
101101 it ( 'should generate snippet method GET without headers' , function ( ) {
102- const expected = 'res <- VERB("GET", url = "https://postman-echo.com/headers")\n' ,
102+ const expected = 'res <- VERB("GET", url = "https://postman-echo.com/headers")\n\n ' ,
103103 res = getSnippetRequest ( {
104104 url : 'https://postman-echo.com/headers' ,
105105 method : 'GET' ,
@@ -110,7 +110,7 @@ describe('getSnippetRequest function', function () {
110110 } ) ;
111111
112112 it ( 'should generate snippet method GET without headers and timeout' , function ( ) {
113- const expected = 'res <- VERB("GET", url = "https://postman-echo.com/headers", timeout(3))\n' ,
113+ const expected = 'res <- VERB("GET", url = "https://postman-echo.com/headers", timeout(3))\n\n ' ,
114114 res = getSnippetRequest ( {
115115 url : 'https://postman-echo.com/headers' ,
116116 method : 'GET' ,
@@ -122,7 +122,7 @@ describe('getSnippetRequest function', function () {
122122 } ) ;
123123
124124 it ( 'should generate snippet method HEAD' , function ( ) {
125- const expected = 'res <- VERB("HEAD", url = "https://postman-echo.com/headers")\n' ,
125+ const expected = 'res <- VERB("HEAD", url = "https://postman-echo.com/headers")\n\n ' ,
126126 res = getSnippetRequest ( {
127127 url : 'https://postman-echo.com/headers' ,
128128 method : 'HEAD' ,
0 commit comments