"namespace is undefined" problem when using jsTestDriver, Idea 9 and testing 3 test cases. Sometimes it just outright hangs.
I just started using jsTestDriver and I really like it, but all of a sudden, I just started getting a very weird error and I'm not sure what the heck I did to create it. Actually, if I try and run a basic Greeter test, the same problem happens.

Here's an example of one of my javascript files/classes under test:

    myapp = myapp || {};
    
    myapp.Module = function() {
        ...
    };

All of the classes follow this pattern.

My test classes generally look like this (I'll give a really simple one):

    ModuleTest = TestCase("ModuleTest");
    
    ModuleTest.prototype.testInit = function() {
        var module = new myapp.Module(); // <---- it bombs here, on every test!
    
        assertFalse(module.isStarted);
    
        module.init();
    
        assertTrue(module.isStarted);
    };

It bombs when it gets to "new myapp.Module()". Here is the error message that is given about 30 times for all my tests:

    myapp is not defined
    /src/test/webapp/js/ModuleTest.js:4

Here is my configuration file:

    server: http://localhost:9876
    
    load:
      - src/main/webapp/js/jquery/*.js
      - src/main/webapp/js/*.js
      - src/test/webapp/js/*.js

Does anyone have any idea what the heck is wrong? Sometimes when I run all the tests in IDEA, my IDE just hangs altogether or takes like many minutes for jsTestDriver to finally report the above results... 

:(
"namespace is undefined" problem when using jsTestDriver, Idea 9 and testing 3 test cases. Sometimes it just outright hangs.
===

I just started using jsTestDriver and I really like it, but all of a sudden, I just started getting a very weird error and I'm not sure what the heck I did to create it. Actually, if I try and run a basic Greeter test, the same problem happens.

Here's an example of one of my javascript files/classes under test:

    myapp = myapp || {};
    
    myapp.Module = function() {
        ...
    };

All of the classes follow this pattern.

My test classes generally look like this (I'll give a really simple one):

    ModuleTest = TestCase("ModuleTest");
    
    ModuleTest.prototype.testInit = function() {
        var module = new myapp.Module(); // <---- it bombs here, on every test!
    
        assertFalse(module.isStarted);
    
        module.init();
    
        assertTrue(module.isStarted);
    };

It bombs when it gets to "new myapp.Module()". Here is the error message that is given about 30 times for all my tests:

    myapp is not defined
    /src/test/webapp/js/ModuleTest.js:4

Here is my configuration file:

    server: http://localhost:9876
    
    load:
      - src/main/webapp/js/jquery/*.js
      - src/main/webapp/js/*.js
      - src/test/webapp/js/*.js

Does anyone have any idea what the heck is wrong? Sometimes when I run all the tests in IDEA, my IDE just hangs altogether or takes like many minutes for jsTestDriver to finally report the above results... 

:(