Skip to content
This repository has been archived by the owner on Mar 26, 2021. It is now read-only.

Commit

Permalink
fix nunjucks autoescape
Browse files Browse the repository at this point in the history
  • Loading branch information
jgroom33 committed Feb 19, 2019
1 parent a93de33 commit 613b4b7
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 2 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@strest/cli",
"version": "2.4.0",
"version": "2.4.1",
"description": "A new dimension of REST API testing",
"main": "dist/main.js",
"repository": "https://github.com/eykrehbein/strest",
Expand Down
3 changes: 2 additions & 1 deletion src/test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,8 @@ const nunjucksEnv = nunjucks.configure(".", {
commentStart: '<#',
commentEnd: '#>'
},
throwOnUndefined: true
throwOnUndefined: true,
autoescape: false
});
nunjucksEnv.addGlobal('Faker', function (faked: string) {
return faker.fake(`{{${faked}}}`);
Expand Down
21 changes: 21 additions & 0 deletions tests/success/validate/queryparam_and.strest.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
version: 2

requests:
setParam:
request:
url: https://postman-echo.com/post
method: POST
postData:
mimeType: application/json
text:
param: https://jsonplaceholder.typicode.com/posts?userId=1&id=3
validate:
- jsonpath: status
expect: 200
useParam:
request:
url: <$ setParam.content.data.param $>
method: GET
validate:
- jsonpath: content.0.id
expect: 3

0 comments on commit 613b4b7

Please sign in to comment.