Git Product home page Git Product logo

Comments (1)

wgroeneveld avatar wgroeneveld commented on May 30, 2024

Hi there,

FIrst and foremost: thanks a lot for trying out the runner! It's not really
perfect or mass-production ready but hey, it works (on my machine, hehe)
It seems like your envjs setup is getting quirky while trying to read
javascript files. I know envjs really sucks at resolving relative paths and
I've "hacked" in some solutions, you can check them out at env.utils.js.

I'd first try to see if load() works as it should. You can start Rhino
standalone using the bat file (rhino.bat).
After that you should try to load any JS file using load() and some
relative path. See bootstrap.js, also in the bin folder, for some examples.
I've had trouble using that on a windows machine but I don't know anymore
how I fixed it. I do know a new version of Rhino is available maybe you can
try that one?

However, if that does work, maybe something in data.js triggers some kind
of exception, you can try to debug with rhino?
I'd also try to load for instance a test html page using:

load("bootstrap.js");
window.location = "test.html"

and try stuff like
"document.getElementById("blah").innerHTML" to see if envjs really loaded
the html file.

Good luck,

-- Wouter

On Tue, Apr 10, 2012 at 11:47 AM, robertfoobar <
[email protected]

wrote:

Hi jefklak,

happy to find your project here as an alternative to the
jasmine-maven-plugin. I tried to setup everything into my project. I
configured my Test class - I think correctly:

@RunWith(JasmineTestRunner.class)
@JasmineSuite(sources = { "lib/jquery-1.7.1.js", "lib/underscore.js",
"lib/require-jquery.js", "lib/backbone.js","lib/bootstrap.js", "main.js" },
specs = {"my.spec.js"}, generateSpecRunner = true, sourcesRootDir =
"src/main/javascript")
public class MyTest {

...

}

As you can see my specs are depending on some 3rd party stuff.

When I run it, the CLI tells me the following:

[ Envjs/1.6 (Rhino; U; Windows 7 x86 6.1; en-US; rv:1.7.0.rc2)
Resig/20070309 PilotFish/1.2.13 ]
failed to open file file://C/:/projectRoot/api/data.js JavaException:
java.net.UnknownHostException: C
js: syntax error
js:

JavaException: java.net.UnknownHostException:
C


js: .^
....

Now there are two problems with that, which I don't know how to resolve:

  1. the path is wrong. api/data.js is actually situated in
    src/main/javascript which I actually configured in using the JasmineSuite
    interface. How come the file path is not reflected. It should be
    file://C/:/projectRoot/src/main/javascript/api/data.js
  2. I am not sure but why is the test runner throwing an
    UnknownHostException for file system resources. Am I missing something. It
    shouldn't try to connect using java.net, right?

I really hope you can point me to something. Let me know if you need my
contributions or the like?
Best regards and thank you in advance!


Reply to this email directly or view it on GitHub:
#4

from jasmine-junit-runner.

Related Issues (9)

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.