TypeScript no longer requires <reference .../> lines: see https://typescript.codeplex.com/discussions/453886
It would be marvellous if one could use Chutzpah without having to supply <reference .../> lines in the unit test files.
Cheers!
Comments: Part of the problem is I hadn't upgraded the VS Chutzpah Test Adapter and Test Runner extensions. I have now done so and can run my test. __However__, a problem remains. If I extend my experiment as follows: * _$/B.ts_ -- defines class _B_ which extends class _C_; * _$/C.ts_ -- defines class _C_; (see the attached zip file) I get this error when right-clicking on _A.ts_ and selecting _Run JS Tests_: ``` Error: ReferenceError: Can't find variable: C in file:///C:/Users/becketr/Documents/Visual%20Studio%202012/Projects/ChutzpahPlayground/ChutzpahPlayground/_Chutzpah.4.B.js (line 15) While Running:C:\Users\becketr\Documents\Visual Studio 2012\Projects\ChutzpahPlayground\ChutzpahPlayground\UnitTests\A.ts ------ Test started: File: C:\Users\becketr\Documents\Visual Studio 2012\Projects\ChutzpahPlayground\ChutzpahPlayground\UnitTests\A.ts ------ Test 'A:encountered a declaration exception' failed TypeError: 'undefined' is not a constructor (evaluating 'new B()') in file:///C:/Users/becketr/Documents/Visual%20Studio%202012/Projects/ChutzpahPlayground/ChutzpahPlayground/UnitTests/_Chutzpah.4.A.js (line 2) at file:///C:/Users/becketr/Documents/Visual%20Studio%202012/Projects/ChutzpahPlayground/ChutzpahPlayground/UnitTests/_Chutzpah.4.A.js:2 at file:///C:/Users/becketr/AppData/Local/Microsoft/VisualStudio/11.0/Extensions/j0psgcsz.gai/TestFiles/jasmine/v2/jasmine.js:613 at file:///C:/Users/becketr/AppData/Local/Microsoft/VisualStudio/11.0/Extensions/j0psgcsz.gai/TestFiles/jasmine/v2/boot.js:37 at file:///C:/Users/becketr/Documents/Visual%20Studio%202012/Projects/ChutzpahPlayground/ChutzpahPlayground/UnitTests/_Chutzpah.4.A.js:6 in C:\Users\becketr\Documents\Visual Studio 2012\Projects\ChutzpahPlayground\ChutzpahPlayground\UnitTests\A.ts (line 3) 0 passed, 1 failed, 1 total (chutzpah). ========== Total Tests: 0 passed, 1 failed, 1 total ========== ```
It would be marvellous if one could use Chutzpah without having to supply <reference .../> lines in the unit test files.
Cheers!
Comments: Part of the problem is I hadn't upgraded the VS Chutzpah Test Adapter and Test Runner extensions. I have now done so and can run my test. __However__, a problem remains. If I extend my experiment as follows: * _$/B.ts_ -- defines class _B_ which extends class _C_; * _$/C.ts_ -- defines class _C_; (see the attached zip file) I get this error when right-clicking on _A.ts_ and selecting _Run JS Tests_: ``` Error: ReferenceError: Can't find variable: C in file:///C:/Users/becketr/Documents/Visual%20Studio%202012/Projects/ChutzpahPlayground/ChutzpahPlayground/_Chutzpah.4.B.js (line 15) While Running:C:\Users\becketr\Documents\Visual Studio 2012\Projects\ChutzpahPlayground\ChutzpahPlayground\UnitTests\A.ts ------ Test started: File: C:\Users\becketr\Documents\Visual Studio 2012\Projects\ChutzpahPlayground\ChutzpahPlayground\UnitTests\A.ts ------ Test 'A:encountered a declaration exception' failed TypeError: 'undefined' is not a constructor (evaluating 'new B()') in file:///C:/Users/becketr/Documents/Visual%20Studio%202012/Projects/ChutzpahPlayground/ChutzpahPlayground/UnitTests/_Chutzpah.4.A.js (line 2) at file:///C:/Users/becketr/Documents/Visual%20Studio%202012/Projects/ChutzpahPlayground/ChutzpahPlayground/UnitTests/_Chutzpah.4.A.js:2 at file:///C:/Users/becketr/AppData/Local/Microsoft/VisualStudio/11.0/Extensions/j0psgcsz.gai/TestFiles/jasmine/v2/jasmine.js:613 at file:///C:/Users/becketr/AppData/Local/Microsoft/VisualStudio/11.0/Extensions/j0psgcsz.gai/TestFiles/jasmine/v2/boot.js:37 at file:///C:/Users/becketr/Documents/Visual%20Studio%202012/Projects/ChutzpahPlayground/ChutzpahPlayground/UnitTests/_Chutzpah.4.A.js:6 in C:\Users\becketr\Documents\Visual Studio 2012\Projects\ChutzpahPlayground\ChutzpahPlayground\UnitTests\A.ts (line 3) 0 passed, 1 failed, 1 total (chutzpah). ========== Total Tests: 0 passed, 1 failed, 1 total ========== ```