I have a situation where Chutzpah is completing with no tests executed, even though there are tests present. There is no error message, it just says zero tests found. I have distilled the situation down to the barest elements necessary for reproduction.
I am using require.js for module management, and have tests in a module which requires both jquery and underscore, which are used for convenience in the real tests. I use a shim for underscore, since it is not an AMD module.
When __both dependencies__ are present in the test module definition, Chutzpah finds no tests. If I comment out __either one of the two dependencies__, it does find the tests in the module. I have reference directives in the test module as well, but their presence or absence seems to have no effect. The file structure of the project is completely flat at present, for simplicity's sake, but putting the 3rd party libraries in a sub-folder and adding path directives has had no effect either.
Attached are the test harness, the test module, and a screenshot showing the file structure.
Comments: I'm attaching a project that shows how I'm trying to use requireJS + qunit with TypeScript. This is the natural way I found to organize the project, but maybe there's a better one. I apologize for the delay in submitting this. Contradicting my previous finding, Chutzpah _does_ find the test, but it fails to resolve the imported module when the test is executed (maybe it doesn't wait for require JS to finish loading the module before executing the test?). However, the tests.html page works OK. For my actual project, I ended up jumping through some hoops and adding helper methods to perform the require explicitly inside the test body, but, besides being a little more cumbersome to use, it doesn't benefit from intellisense & type checking that I gain by using the TS import module syntax. I hope the sample can help to find a way to integrate TS with AMD and chutzpah better. Thanks for the amazing support!!
I am using require.js for module management, and have tests in a module which requires both jquery and underscore, which are used for convenience in the real tests. I use a shim for underscore, since it is not an AMD module.
When __both dependencies__ are present in the test module definition, Chutzpah finds no tests. If I comment out __either one of the two dependencies__, it does find the tests in the module. I have reference directives in the test module as well, but their presence or absence seems to have no effect. The file structure of the project is completely flat at present, for simplicity's sake, but putting the 3rd party libraries in a sub-folder and adding path directives has had no effect either.
Attached are the test harness, the test module, and a screenshot showing the file structure.
Comments: I'm attaching a project that shows how I'm trying to use requireJS + qunit with TypeScript. This is the natural way I found to organize the project, but maybe there's a better one. I apologize for the delay in submitting this. Contradicting my previous finding, Chutzpah _does_ find the test, but it fails to resolve the imported module when the test is executed (maybe it doesn't wait for require JS to finish loading the module before executing the test?). However, the tests.html page works OK. For my actual project, I ended up jumping through some hoops and adding helper methods to perform the require explicitly inside the test body, but, besides being a little more cumbersome to use, it doesn't benefit from intellisense & type checking that I gain by using the TS import module syntax. I hope the sample can help to find a way to integrate TS with AMD and chutzpah better. Thanks for the amazing support!!