-
Notifications
You must be signed in to change notification settings - Fork 518
Add Unit Test Samples to the Templates #87
Comments
Good point, this issue related to #9. |
Definitely think karma tests should be a part of the workflow as an option to add on, so that with PhantomJS they can be run as part of a Continuous Integration and Deployment |
I agree, a working example of Jasmine/Karma unit tests would be extremely helpful. We're at our wit's end at this point trying to find a way to get this to work with this template. |
I've put an example of Karma+Jasmine+Chai testing in a separate branch here: 3d50174 Is this what you're trying to do? To add this to your own project:
Are these the kinds of tests you want to write? |
Do you have a preproccessor setup to handle your spec files and compile the typescript? Karma doesn't know es6 imports / typescript by default. Hopefully soon it will! |
I use ts-node in all my Node / karma / gulp situations to automatically handle all Typescript. Check it out in the future! |
Mark,
In the branch Steve posted I don't see where he explicitly added any code to do what you're talking about other than the existing code above, which it seems should transpile everything inside the ClientApp folder (our test scripts are inside this folder, in ClientApp/specs folder, Steve's are in ClientApp/tests folder). Or maybe I'm missing something with this assumption? |
You have the preproccessor sin karma config file and everything else in that commit? Under files there that commit is also pointing to ClientApp/test/ so that might be it!
|
The I'll close this since it's now seeming to be a TypeScript/Karma usage question, and will reopen a new issue that just reflects the original request (adding unit tests to the templates). Hope that's OK. |
Thanks so much for your work on this. We did finally get it working with all of your help. |
These templates are extremely helpful for getting started, but I'm at a loss how to fit unit testing into this workflow. Could someone please look into adding a working sample of a unit test using jasmine/karma? A jasmine test page in addition to the index page on the home controller that updates as changes occur during development would be great.
The text was updated successfully, but these errors were encountered: