Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error: PhantomJS timed out, possibly due to a missing QUnit start() call #15

Closed
jansepar opened this issue Jan 18, 2013 · 4 comments
Closed

Comments

@jansepar
Copy link

I'm getting an issue when setting up a simple qunit test to be run through grunt with phantom:

PhantomJS timed out, possibly due to a missing QUnit start() call

I'm kind of stumped, I would love to know what I'm missing!

My grunt file looks like this:

    qunit: {
      all: ['tests/*.html']
    },
    connect: {
        server: {
            options: {
                port: 3000,
                base: '.'
            }
        }
    },

I'm using these versions:

grunt@0.4.0rc6
grunt-contrib-qunit@0.1.1rc6

And where is what my sample looks like:

<html>
<head>
  <meta charset="utf-8">
  <title>Tests</title>
  <link rel="stylesheet" href="/tests/resources/qunit-1.10.0.css">
</head>
<body>
  <div id="qunit"></div>
  <script src="/tests/resources/qunit-1.10.0.js"></script>
  <script>
    console.log("====TEST===")
    test( "hello test", function() {
      ok( 1 == "1", "Passed!" );
    });
  </script>
</body>
</html>

I know it's running because I get the console log output. Any help would be much appreciated!

@jansepar
Copy link
Author

Figured it out! It was loading my qunit tests through the filesystem. I didn't read the instructions carefully enough that I needed to specify a URL instead of a path, and change some configuration options in grunt. It now looks like this:

    qunit: {
        all: {
          options: {
            urls: [
              'http://localhost:3000/tests/test.html',
            ]
          }
        }
    },

Which works! The error was a little misleading though, if something could be done about that, it might save headaches for other developers :)

@cowboy
Copy link
Member

cowboy commented Jan 19, 2013

Can you file an issue about improving the error in this case? I'm not sure I have that level of control, but I can look into it. Thanks!

@fishermand46
Copy link

@jansepar this fixed the problem for me too! Thx for posting!

lidel added a commit to lidel/pls.watch that referenced this issue Dec 28, 2015
lidel added a commit to lidel/pls.watch that referenced this issue Dec 28, 2015
lidel added a commit to lidel/pls.watch that referenced this issue Dec 28, 2015
@nitinsinghit
Copy link

I am still seeing same error. This is my grunt file
qunit: { all: { options: { urls: [ 'http://localhost:8000/test/unit/qUnit.html', ] } } }, connect: { server: { options: { port: 8000, base: '.' } } },

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants