You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
While working on #5 adding initial tests for the project I have come across several functions that are not of the form function (input) { code; return result}, instead most of the offending code is of the form function(input) {code; someOtherClassOrObject.resultingAction() }. The lack of return makes testing difficult and often requiring the use of stubs. Upon a quick search I haven't found any source that simply explains stubbing in swift so for now I am going to add all code requiring tests through this method here.
It would be possible and indeed easier to test a lot of these functions by returning and I have done this in the past whilst writing tests for a node project; but performance is a huge concern with an IOS project and compromising performance would go against the very reason for introducing tests in the first place which is to help ensure a better final project.
This issue will remain open until either tests are added or points can be proved untestable (personally I think this is unlikely) but this is low priority
Currently tracked files marked with TODOs where tests are needed, search project for #35 to find comments
The text was updated successfully, but these errors were encountered:
Branch is actually up for this issue with some work done. Mildly blocked by #6 as I wanted to remove LTMorphingLabel from the project and use a vanilla animation instead. Probably also worth taking a look at the coverage and excluding tests and podfiles from weighing in on the calculation
While working on #5 adding initial tests for the project I have come across several functions that are not of the form
function (input) { code; return result}
, instead most of the offending code is of the formfunction(input) {code; someOtherClassOrObject.resultingAction() }
. The lack of return makes testing difficult and often requiring the use of stubs. Upon a quick search I haven't found any source that simply explains stubbing in swift so for now I am going to add all code requiring tests through this method here.It would be possible and indeed easier to test a lot of these functions by returning and I have done this in the past whilst writing tests for a node project; but performance is a huge concern with an IOS project and compromising performance would go against the very reason for introducing tests in the first place which is to help ensure a better final project.
This issue will remain open until either tests are added or points can be proved untestable (personally I think this is unlikely) but this is low priority
Currently tracked files marked with TODOs where tests are needed, search project for #35 to find comments
The text was updated successfully, but these errors were encountered: