GithubHelp home page GithubHelp logo

Comments (16)

putermancer avatar putermancer commented on July 24, 2024

Even if the phantomjs case doesn't throw an exception in your setup, the Nodejs block follows that and should still run after the phantomjs block. I'm not saying it might not make sense to put in your proposed change, I just want to try and understand what is happening a bit better.

A few quick questions:

  1. What version of jasmine-node and jasmine-reporters are you using?
  2. Does the output directory already exist? Some people have had problems with trying to write to a directory that doesn't exist yet. In the jasmine2 branch of jasmine-reporters we have solved this problem using the mkdirp module.
  3. Have you tried using the jasmine2.x branches of both jasmine-node and jasmine-reporters? Does the same error happen there?

from jasmine-reporters.

tobimx avatar tobimx commented on July 24, 2024

jasmine-node: 1.14.3
with its own jasmine-reporters dependency: 0.4.1

tried both, with existing and non-existing directory.
If not exist, a folder became created with no content

i will try. Keep you updated asap.

I'am looking forward to make it work without any modifications on your side.

from jasmine-reporters.

tobimx avatar tobimx commented on July 24, 2024

Testing 2.0.0-beta4 isn't as easy as expected. We are using --requireJsSetup to get access to the global scope where the files of src are executed.

Upgrading to 2.x means to refactor jasmine integration in our project completely.
My product owner don't like the word refactor at all :/. I get back to you when I find a way and some private time to upgrade.

from jasmine-reporters.

putermancer avatar putermancer commented on July 24, 2024

No worries, I am not asking you I spend a lot of time on something you
aren't ready for, I was just hoping a test of Jasmine2 would be quick and
help track down if the problem happens there as well.

I will try to reproduce your setup with the same versions of jasmine-node
and jasmine-reporters. What operating system and version of node are you
using?

On Monday, May 26, 2014, Tobias Busse [email protected] wrote:

Testing 2.0.0-beta4 isnt as easy as expected. We are using--requireJsSetupto
get access to the global scope where the files ofsrc` are executed.

Upgrading to 2.x means to refactor jasmine integration in our project
completely.
My product owner don't like the word refactor at all. I get back to you
when I find a way and some private time to upgrade.


Reply to this email directly or view it on GitHubhttps://github.com//issues/59#issuecomment-44206187
.

from jasmine-reporters.

tobimx avatar tobimx commented on July 24, 2024

its os mavericks and v0.10.28

from jasmine-reporters.

alanning avatar alanning commented on July 24, 2024

This is caused by the path and filename variables getting overwritten in getQualifiedFilename and in the "rhino" and "phantomjs" try..catch blocks. By the time the nodejs try..catch block is executed, path and/or filename have a bunch of 'undefined's in them.

A couple different places causing issues:

  1. getQualifiedFilename will append 'undefined' to "path" when separator is undefined.
  2. rhino block overwrites both filename and path
  3. phantomjs block overwrites both filename and path

My suggested fix is to isolate the individual sections and prevent modification of path and filename variables. I'll put together a PR for this and submit for consideration shortly.

from jasmine-reporters.

angelsmercy avatar angelsmercy commented on July 24, 2024

Does this mean we are any closer to seeing -junit output from jasmine-node? I believe jasmine-node2 currently has all report output disabled until such time as jasmine-reporter2 is ready?

from jasmine-reporters.

putermancer avatar putermancer commented on July 24, 2024

Should be. I worked with the jasmine-node team while updating the reporters to work with jasmine2 and everything seemed to be working. Then I sat on it and forgot to merge for 2 months...

I should be merging this patch very soon (probably today) and then doing a new release. The current plan is that jasmine2 reporters will take over the master branch with a 2.0.0 tag, and the jasmine1 reporters will be maintained in a separate branch for those who still need it (for example, protractor does not currently support jasmine2)

from jasmine-reporters.

angelsmercy avatar angelsmercy commented on July 24, 2024

That's wonderful news! There will be cheers and laughter and much merriment once we can all see those lovely junit reports again. Look forward to hearing.

from jasmine-reporters.

alanning avatar alanning commented on July 24, 2024

For those who would like to use junit reports with jasmine-node, I published a fork of v1.14.3 that has this patch applied: https://www.npmjs.org/package/jasmine-node-reporter-fix

We needed it for our Meteor-compatible test framework, jasmine-unit but will switch back to the main repo once this patch lands upstream.

from jasmine-reporters.

putermancer avatar putermancer commented on July 24, 2024

@alanning thanks for the fix!

from jasmine-reporters.

putermancer avatar putermancer commented on July 24, 2024

Patch also added to the NUnit reporter.

from jasmine-reporters.

chulian1819 avatar chulian1819 commented on July 24, 2024

solved using @alanning fix, but still having issues wen using just require('jasmine-reporters')

from jasmine-reporters.

putermancer avatar putermancer commented on July 24, 2024

@chulian1819 Can you be a bit more specific? Are you programmatically using jasmine-node and manually using jasmine-reporters, rather than using jasmine-node via the CLI? How is jasmine-reporters being used, what version is it at, and what error are you getting?

The file saving fixes should be present in both [email protected] and [email protected], the difference being which version of Jasmine is supported (and jasmine-node currently requires the wrong version of jasmine-reporters, causing problems -- see mhevery/jasmine-node#333)

from jasmine-reporters.

chulian1819 avatar chulian1819 commented on July 24, 2024

Hello @bloveridge! works ok if I user [email protected] but on [email protected] the files are not generated, is the fix merged for v2?

ps: using jasmine-node-reporter-fix at the beginning I thought it worked but launches all the test without waiting for the browser, so every test fails

from jasmine-reporters.

putermancer avatar putermancer commented on July 24, 2024

Thanks for the update, that is what I expected.

In order to use [email protected], you need to be using a jasmine2-compatible version of jasmine-node as well. I believe the default clone / install behavior for jasmine-node is still to use jasmine1.x compatibility, but currently jasmine-node is requiring jasmine-reporters in such a way that it pulls down the jasmine2.x version of jasmine-reporters.

You may be interested in reading the discussion on #63, but the real issue needs to be fixed in jasmine-node (issue 333 as linked above).

from jasmine-reporters.

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.