|
an skeleton posted:Got a question. I'm an intern at a local company and one of our goals this month is to get jasmine/karma testing online for one of our company's web applications this month. Problem is, the people who are supposed to help us are always busy and it doesn't seem like its gonna get done unless we do it ourselves. However I have no experience with unit testing and I'm feeling kinda intimidated by the whole idea, does anyone have any guidance for getting a jasmine/karma testing framework online for a large angular/jquery web app? What do you mean as in "online"? Unit testing is kind of one of those things thats tricky to do after the fact, especially for a large app if it has 0 test coverage. Setting your sights on getting a test suite up, with full coverage for a large JS app in a month is pretty ambitious. I would just get jasmine/karma running if I were you, even if it is for a sample app at the moment, just to get the hang of it and see how it works. Then pick just a few small sections of the application you know a little bit about and practice writing tests.
|
# ¿ Mar 8, 2014 08:21 |
|
|
# ¿ May 6, 2024 19:18 |
|
SQLite?
|
# ¿ Mar 27, 2014 00:20 |
|
an skeleton posted:Sooo I'm trying to write jasmine unit tests for our big angular web app (which was not designed with unit testing in mind) and there's something funny happening. We have a checkValue() function that basically checks if a field is blank/invalid and if not, returns that value. The strange thing is, the logic (which was not written by me) seems to be checking for an array. But the <select> directive we are using only makes the value an array if you change it in the view, as far as I can tell. When I'm running jasmine tests I can't seem to replicate this effect (since I am not affecting the value from the view but just manually reassigning values from the unit test), so the tests always crash when the checkValue() function tries to run .join() on the value. Basically I am at a loss of how to make our app think we changed the value from the view and not manually from inside the test, I guess. If I were you I would seriously be working on just getting some high level black box testing going. If you have large app like you are describing adding unit tests like this is going to drive you crazy, as you might already be experiencing. Not to completely detract from your original question but I see you continually running in to these types of things on the road that you are on.
|
# ¿ Mar 27, 2014 02:18 |