Guest User

Untitled

a guest
Feb 21st, 2018
85
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.13 KB | None | 0 0
  1. describe('HTTP Method Test for app.js', function() {
  2. var frisby = require('frisby');
  3. frisby.post('http://localhost:8000/abc/getme/login', {
  4. username:"myusername",
  5. password:"mypassword"
  6. }, {json: true})
  7. frisby.addHeaders({
  8. 'Content-type':'application/json'
  9.  
  10. })
  11. frisby.expectHeaderContains('content-type', 'application/json')
  12. frisby.expectJSON({
  13. method: 'POST'
  14. }).toss();
  15. });
  16.  
  17. Failures:
  18.  
  19. 1) HTTP Method Test for app.js encountered a declaration exception
  20. Message:
  21. TypeError: frisby.addHeaders is not a function
  22. Stacktrace:
  23. TypeError: frisby.addHeaders is not a function
  24. at jasmine.Suite.<anonymous> (/home/srikanth/Desktop/qcs/QCS/server/spec/app_spec.js:8:20)
  25. at Object.<anonymous> (/home/srikanth/Desktop/qcs/QCS/server/spec/app_spec.js:2:5)
  26. at Module._compile (module.js:660:30)
  27. at Object.Module._extensions..js (module.js:671:10)
  28. at Module.load (module.js:573:32)
  29. at tryModuleLoad (module.js:513:12)
  30. at Function.Module._load (module.js:505:3)
Add Comment
Please, Sign In to add comment