Am I able to output and view Frisby.js requests?

jjelly

I'm getting started with frisby.js and I'm also new to Jasmine and node.js.

After stumbling over some of my first frisby tests, I wanted to know if it were possible to output the requests in my tests to the console so that I could validate I have the correct request headers and request body etc. each time I run my tests with

jasmine-node myproj/spec

I think this might be useful if the requests would also be included into the reports when I run my tests with the --junitreport option

I was originally hoping that running my tests with --verbose would provide this, but --verbose only seems to output the request method and URL of the top level test and not any tests nested under it using after() or afterJSON(), which is also disappointing!

I've tried searching around but did not find an answer to this simple question, any help would be much appreciated thanks!

jjelly

In case anyone else runs into this, frisby also has the following inspector:

inspectRequest()

For example, if you have the following a simple test

frisby.create('My Test')
      .get('http://httpbin.org/get?foo=bar&bar=baz')
      .inspectRequest()
      .expectStatus(200)
      .toss();

This will output something similar to the following in your console:

{ json: false,
  uri: 'http://httpbin.org/get?foo=bar&bar=baz',
  body: null,
  method: 'GET',
  headers: 
     { 'content-type': 'application/json' },
  timeout: 5000 }

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

From Dev

I am not able to understand the output I am getting for printing an array of 1st eight array elements

From Dev

I am not able to address the dynamic array in angular js

From Dev

i am not able to load JBBarChartView into my view? I cannot see anything in the view

From Dev

Apache Spark Not able to view output

From Dev

I am not able to install svnnotify

From Dev

I want to Access enTranslations provided in one JS File as shown Below, But I am not Able to access it

From Dev

I am trying to pass a string from one view controller to another view controller while unwinding using segues and I am not able to do so

From Dev

I am not being able to use my ES6 syntax in node.JS

From Dev

I'm not able to make Web requests in node

From Dev

Why am I not Able to Construct This Regex

From Dev

Why am I not able to open a VS project

From Dev

Am I able to call a Enums constructor in Java?

From Dev

I am not able to click on button in protractor

From Dev

Why am I not able to wget these types of links?

From Dev

Why am I not able to change worksheet reference?

From Dev

I am not able to get the file path

From Dev

Why am I not able to add a JPanel to a JPanel?

From Dev

Why am I not able to use $this is an opencart helper?

From Dev

I am not able to use enumerate function properly

From Dev

I am not able to update TexStudio in Ubuntu 15.04

From Dev

I am not able to run this Python program

From Dev

I am not able to log on to the Windows Recovery Tool

From Dev

Why am I able to open this file?

From Dev

I am able to modify a constant string

From Dev

I am not able to start dnsmasq on boot

From Dev

Why am I not able to add this route?

From Dev

I am not able to click on the list item in protractor

From Dev

I am not able to toggle between classes

From Dev

I am not able to check Multiple radio button

Related Related

  1. 1

    I am not able to understand the output I am getting for printing an array of 1st eight array elements

  2. 2

    I am not able to address the dynamic array in angular js

  3. 3

    i am not able to load JBBarChartView into my view? I cannot see anything in the view

  4. 4

    Apache Spark Not able to view output

  5. 5

    I am not able to install svnnotify

  6. 6

    I want to Access enTranslations provided in one JS File as shown Below, But I am not Able to access it

  7. 7

    I am trying to pass a string from one view controller to another view controller while unwinding using segues and I am not able to do so

  8. 8

    I am not being able to use my ES6 syntax in node.JS

  9. 9

    I'm not able to make Web requests in node

  10. 10

    Why am I not Able to Construct This Regex

  11. 11

    Why am I not able to open a VS project

  12. 12

    Am I able to call a Enums constructor in Java?

  13. 13

    I am not able to click on button in protractor

  14. 14

    Why am I not able to wget these types of links?

  15. 15

    Why am I not able to change worksheet reference?

  16. 16

    I am not able to get the file path

  17. 17

    Why am I not able to add a JPanel to a JPanel?

  18. 18

    Why am I not able to use $this is an opencart helper?

  19. 19

    I am not able to use enumerate function properly

  20. 20

    I am not able to update TexStudio in Ubuntu 15.04

  21. 21

    I am not able to run this Python program

  22. 22

    I am not able to log on to the Windows Recovery Tool

  23. 23

    Why am I able to open this file?

  24. 24

    I am able to modify a constant string

  25. 25

    I am not able to start dnsmasq on boot

  26. 26

    Why am I not able to add this route?

  27. 27

    I am not able to click on the list item in protractor

  28. 28

    I am not able to toggle between classes

  29. 29

    I am not able to check Multiple radio button

HotTag

Archive