jsTestDriver and Prototype.js - TypeError: is not a constructor

Hello

I am using WebStorm v4.0 Build 117.190.

Trying to run tests through jsTestDriver on my prototype.js classes doesn't work, whenever I try and create the class I get an error 'TypeError: myClass is not a constructor".

However the tests work successfully on basic javascript functions.

I've attached a zip which should illustrate this problem.

I may be setting this up incorrectly, so thought I'd check here, otherwise I will file it as a bug.

Thanks a lot!
Duncan



Attachment(s):
WebStormBugReport.zip
2 comments
Comment actions Permalink

Hi,

fixed tests are attached.
In Project View you can select 'fixed' and 'original' directories, right click and select 'Compare Directories'. So you'll see my changes.
Note: to run tests you should have JsTestDriver configuration file (see fixed/test-config.jstd).
To run tests right click on it and select "Run".

--
Sergey



Attachment(s):
fixed-prototype-tests.zip
0
Comment actions Permalink

Thanks Sergey that's great.  Just for the record the other tests that were faulty were just silly attempts to get the class to instantiate!

But I see where the real problem lay - in the .jstd config file in the root.  I did have a similar config file but this was called 'jstestconfig.config' and obviously wasn't picked up by jsTestDriver.

Many thanks again for fixing this problem
Duncan

0

Please sign in to leave a comment.