Resharper 6 and Javascript Reference

/Hello there,

I am facing an issue with the new Javascript features in Resharper 6 and the QUnit testing.

I have existing javascript code in <myproject>/Scripts/ and <myproject>/Scripts/Shared/

And tried to define new UnitTest in a couple of different locations

such as <unittestproject>/test.js or <myproject>/ScriptsTests/test.js but everytime I was to call one of the function in a javascript file not located in the same folder I get:

Died on test #1: <ClassName> is not defined - { "arguments": [ "<ClassName>" ], "type": "not_defined", "message": "<ClassName> is not defined"

<ClassName> is the actual javascript className.

I made sure to add

/// <reference path="~/Scripts/Shared/MyFile.js"/>

at the top of the file.

I hope it is clear enough, I tried different approach to solve this issue but nothing worked so far and the only solution I found working at the moment is placing the tests in the same folder as the production javascript code.

Well thanks for your time.

Regards,

Simon Jouet

3 comments

Bump ...


I wanted to ask for some details. Is it that the javascript code is in different folders under the same project (within the solution)? Or, are the javascript files in different projects?


(The reason I'm asking is because R#6 doesn't currently supports javascript intellisense across projects. But, it would be super sweet if it did!)

I completely misread the original post.

0

Hello Simon,

Do those tests run correctly if you run them using a test html page manually
(not using ReSharper's unit test runner)? Thank you!

Andrey Serebryansky
Senior Support Engineer
JetBrains, Inc
http://www.jetbrains.com
"Develop with pleasure!"

/Hello there,

I am facing an issue with the new Javascript features in Resharper 6
and the QUnit testing.

I have existing javascript code in <myproject>/Scripts/ and
<myproject>/Scripts/Shared/

And tried to define new UnitTest in a couple of different locations

such as <unittestproject>/test.js or <myproject>/ScriptsTests/test.js
but everytime I was to call one of the function in a javascript file
not located in the same folder I get:

+Died on test #1: <ClassName> is not defined - { "arguments": [
"<ClassName>" ], "type": "not_defined", "message": "<ClassName> is not
defined"+

<ClassName> is the actual javascript className.

I made sure to add

/// <reference path="~/Scripts/Shared/MyFile.js"/>

at the top of the file.

I hope it is clear enough, I tried different approach to solve this
issue but nothing worked so far and the only solution I found working
at the moment is placing the tests in the same folder as the
production javascript code.

Well thanks for your time.

Regards,

Simon Jouet

---
Original message URL:
http://devnet.jetbrains.net/message/5308311#5308311



0

Please sign in to leave a comment.