Advertisement
Guest User

Untitled

a guest
Mar 20th, 2019
66
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.90 KB | None | 0 0
  1. const string = `
  2. * @body
  3. * {
  4. * "test": "test"
  5. * }
  6. * @test
  7. * pm.test("", function() {
  8. * });
  9. * @example
  10. * {
  11. * "name": "test1",
  12. * "status": "200 OK",
  13. * "body": {},
  14. * ""
  15. * }
  16. * @example
  17. * {
  18. * "name": "test2",
  19. * "status": "400",
  20. * "body"
  21. * }
  22. *
  23. *
  24. `;
  25.  
  26. * @body
  27. * {
  28. * "test": "test"
  29. * }
  30.  
  31. * @example
  32. * {
  33. * "name": "test1",
  34. * "status": "200 OK",
  35. * "body": {},
  36. * ""
  37. * }
  38. * @example
  39. * {
  40. * "name": "test2",
  41. * "status": "400",
  42. * "body"
  43. * }
  44.  
  45. string.match(/@*([^[@]+)/g)
  46.  
  47. [ ' n* ',
  48. '@bodyn* {n* "test": "test"n* }n* ',
  49. '@testn* pm.test("Response time is less than 200ms", function() {n* pm.expect(pm.response.responseTime).to.be.below(500);n* });n* ',
  50. '@examplen* {n* "name": "test1",n* "status": "200 OK",n* "body": {},n* ""n* }n* ',
  51. '@examplen* {n* "name": "test2",n* "status": "400",n* "body"n* }n* n* n' ]
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement