Coder Social home page Coder Social logo

Comments (15)

vlucas avatar vlucas commented on August 29, 2024

This probably has to do with nested Jasmine tests. Frisby is essentially creating a new Jasmine test inside the Jasmine test that just ran. I would do this in raw jasmine to see if you get the same result. If not, I can take a look to see if it's something Frisby is doing.

from frisby.

cjsaylor avatar cjsaylor commented on August 29, 2024

I've noticed this same behavior, but haven't tried raw jasmine. If an error occurs within the nested frisby test, it does show the error and the correct text within the create() method call.

from frisby.

AGvin avatar AGvin commented on August 29, 2024

Have a similar problem, but only if i use "delete" method.

  frisby.create('Check phone del.').delete(request_server + '/phonesRest/phones/' + 1234567).expectStatus(204).toss();

Item will correctly deleted, but in console will have only some blue dots.

from frisby.

vlucas avatar vlucas commented on August 29, 2024

I just published a new version of Frisby (0.6.5) - see if that solves this issue.

from frisby.

AGvin avatar AGvin commented on August 29, 2024

Node request module have some problems with 204/304 http statuses. They not have response body. With node v0.8.16 we have unhandled error in console, with node v0.9.5 at console we have nothing output.

from frisby.

vlucas avatar vlucas commented on August 29, 2024

204 HTTP Status means "No Content", so it's not going to have a response body. 304 means "Not Modified", so it is also returned without a response body. Are you saying this is a problem with node request, or that Frisby needs to check for the HTTP status in the inspector methods because you get errors trying to print the body in console?

from frisby.

AGvin avatar AGvin commented on August 29, 2024

I think, this is problem with node. I don't trying to print the body, i only expect HTTP status.

frisby.create('Check some del.').delete(request_server + '/somepath/1234567' + ).expectStatus(204).toss();

I made tests on 3 different servers, and have different results. (error at output, nothing at output, and success).

from frisby.

vlucas avatar vlucas commented on August 29, 2024

I do pretty much the exact same thing in one of my own applications, and it works without errors. You do have an extra plus sign + after the path, so maybe that is the issue (probably not because you may have just edited it for the issue)?

frisby.create('Check some del.').delete(request_server + '/somepath/1234567').expectStatus(204).toss();

My test looks like this:

// DELETE item we created
app.frisby.create('Delete event item we created')
  .delete(cevent._links.self.href)
  .expectStatus(204)
.toss();

And it works fine. The server side on that particular app is PHP, but I just tested it on a Ruby on Rails app and it works too. I'm thinking it's the server-side of your app not sending the correct response somehow. You might try using the inspectRequest(), inspectBody(), and inspectResponse() helper methods on your Frisby test to see what is being sent by Frisby and what is being returned by your server.

from frisby.

AGvin avatar AGvin commented on August 29, 2024

Server return only 204 status. I think, this is problem with my node '"request" module.
Thanks for help.

from frisby.

mschroering avatar mschroering commented on August 29, 2024

I believe this is a problem with the Verbose Terminal Reporter in jasmine-node. It gets the list of tests when execution starts and reports the success status of this list. The problem is that this list does not contain the 'nested' tests as they haven't been created yet. The Simple Terminal Reporter does handle this better.

from frisby.

inv-vinoth avatar inv-vinoth commented on August 29, 2024

@mschroering The issue still persists, i guess it has to more with jasmine-node than Frisby.

from frisby.

deem0n avatar deem0n commented on August 29, 2024

As of March 2015 frisby still have problems with console titles for frisby.create('') calls nested in the after().
You will see top level title and all nested titles will be missed
I use code like this:

 frisby.create('Login')
  .get('auth')
  .afterJSON(function(user) {
    frisby.create('Update user')
      .put(URL_AUTH + '/users/' + user.id + '.json', {tags: ['jasmine', 'bdd']})
      .expectStatus(200)
    .toss();
  })
.toss();

and see this when I run tests:
jasmine-node --verbose 0100-datasets-spec.js

Frisby Test: Login - 267 ms

    [ POST ***URL*** ] - 267 ms

information for 'Update user' tests is missed in output. Any idea how to fix it ?

from frisby.

ymkjp avatar ymkjp commented on August 29, 2024

I have the same issue to #11 (comment), in nested frisby.create with .after.

Not only --verbose option, inspectOnFailure option also outputs blank.

POST http://example.com/foo has FAILED with the following response:

I wonder jasmine-node cause these problems, however it's nice if fixed within frisby implementation how to call jasmine's suites.

from frisby.

wp-sobj avatar wp-sobj commented on August 29, 2024

So what's going on with this? I'm still experiencing the issue.

from frisby.

vlucas avatar vlucas commented on August 29, 2024

All of this is fixed in v2. Please update to v2 to fix this. There is no way to fix this in any previous version of Frisby before v2.x. See #316 for more details on why.

from frisby.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.