New answers tagged

1

Maybe it will help if I put this in OOP terms first. A class has public and private methods, and you unit test via the public methods. But sometimes you make calls from that class into other classes, and those classes also have their public methods unit tested, even though those public methods are technically implementation details of the first class. ...


6

It's not the size of the function. It's how it's used. Let's take some well tested functions, + - * and Math.sqrt(), and compose them into a distance function: function getDistance(xA, yA, xB, yB) { var xDiff = xA - xB; var yDiff = yA - yB; return Math.sqrt(xDiff * xDiff + yDiff * yDiff); } kirupa - using the pythagorean theorem to measure ...


2

First off. Wow!!! your staging environment does not have the correct schema? Stuff tests, work that out first. Your process has bigger issues than testing whether or not a migration works. The best database tests basically do it all. build a pre-migrated dev database, test and record results, migrate, test and record results, compare results unexpected ...


Top 50 recent answers are included