Guest User

Untitled

a guest
Jan 17th, 2018
74
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.54 KB | None | 0 0
  1. JSONResponse1={
  2. //
  3. "str":null,
  4. //
  5. }
  6. JSONResponse2={
  7. //
  8. "str":"string",
  9. //
  10. }
  11.  
  12. const test = require('testdata');
  13.  
  14. describe('test', () => {
  15.  
  16.  
  17. test.scenarios.foreach((x) => {
  18. beforeEach((done) => {
  19. options = {
  20. method: 'GET',
  21. json: true,
  22. url: x.url;
  23. }
  24. done();
  25. });
  26.  
  27. it(x.title, (done) => {
  28. request(options, (error, response, body) => {
  29. expect(body.str).to.be.a('string');
  30. done();
  31. });
  32.  
  33. console.log();
  34. done();
  35. });
  36. });
  37. });
Add Comment
Please, Sign In to add comment