Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- const string = `
- * @body
- * {
- * "test": "test"
- * }
- * @test
- * pm.test("", function() {
- * });
- * @example
- * {
- * "name": "test1",
- * "status": "200 OK",
- * "body": {},
- * ""
- * }
- * @example
- * {
- * "name": "test2",
- * "status": "400",
- * "body"
- * }
- *
- *
- `;
- * @body
- * {
- * "test": "test"
- * }
- * @example
- * {
- * "name": "test1",
- * "status": "200 OK",
- * "body": {},
- * ""
- * }
- * @example
- * {
- * "name": "test2",
- * "status": "400",
- * "body"
- * }
- string.match(/@*([^[@]+)/g)
- [ ' n* ',
- '@bodyn* {n* "test": "test"n* }n* ',
- '@testn* pm.test("Response time is less than 200ms", function() {n* pm.expect(pm.response.responseTime).to.be.below(500);n* });n* ',
- '@examplen* {n* "name": "test1",n* "status": "200 OK",n* "body": {},n* ""n* }n* ',
- '@examplen* {n* "name": "test2",n* "status": "400",n* "body"n* }n* n* n' ]
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement