Skip to content

Commit 73be04a

Browse files
committed
adding indent test for curl
1 parent 3c0b342 commit 73be04a

1 file changed

Lines changed: 12 additions & 0 deletions

File tree

‎test/targets/curl.js‎

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,4 +39,16 @@ describe('cURL', function () {
3939

4040
done();
4141
});
42+
43+
it('should use custom indentation', function (done) {
44+
var result = new HTTPSnippet(fixtures.simple).curl({
45+
lineBreaks: true,
46+
indent: '@'
47+
});
48+
49+
result.should.be.a.String;
50+
result.replace(/\\\n/g, '').should.eql('curl --request POST @--url "http://httpconsole.com/debug?foo=bar" @--cookie "bar=baz" @--header "Content-Type: application/json" @--data "{\\"foo\\": \\"bar\\"}"');
51+
52+
done();
53+
});
4254
});

0 commit comments

Comments
 (0)