1

Closed

Tests doesnt work with modules.

description

Hi,

I have this little code in my Test.ts (This is the codefile) file: http://pastebin.com/fWw2UwYh. And this is my Testfile (Collections.ts): http://pastebin.com/ccnQ1hc4. The require.d.ts file is in the same dir as the 2 other files.

When I call the task, I got this error: Chutzpah Error: Error in [Laufzeitfehler in JavaScript]: C:\ProjectPath\tests\spec\Collection.ts: error TS2094: The property 'Collections' does not exist on value of type 'C:/ProjectPath/tests/spec/Test.ts'. While Running:C:\ProjectPath\tests\spec\Collection.ts.

When I change line 10 from var myList = new SystemModule.Collections.Generic.List<string>(); to var myList = new SystemModule.System.Collections.Generic.List<string>();

I got this error:
JS Error: ReferenceError: Can't find variable: exports in file:///C:/ProjectPath/tests/spec/_Chutzpah.1.Test.js (line 14) While Running:C:\ProjectPath\tests\spec\Collection.ts.

JS Error: ReferenceError: Can't find variable: require in file:///C:/ProjectPath/tests/spec/_Chutzpah.1.Test.js (line 14) While Running:C:\ProjectPath\tests\spec\Collection.ts.

The same happens only when I call console.log(SystemModule); as you can see. I cant find the error.


Regards

Chris
Closed Oct 25, 2013 at 4:26 AM by mmanela
Fixed by user

comments

ChrisLE wrote Oct 10, 2013 at 7:26 PM

Ok solved. I have deleted the first export at line one: http://pastebin.com/2nufqFKB
And this is my test: http://pastebin.com/Vp9N3pUw

My failure :).


Regards

mmanela wrote Oct 16, 2013 at 1:36 PM

ok cool, so everything works ok now?

ChrisLE wrote Oct 16, 2013 at 7:59 PM

Yes everything is ok now, can be closed :).