AppsScriptPulse

Unit Testing in GAS Part 4: Error Handling | ohhey[blog]

Up until now, our Calcs class has handled errors with simple true and false flags. That’s not helpful to the user. At this point, we’re ready to begin defining and testing custom errors in our functions.

QUnit allows a throws method which can check for errors in your application. This tutorial post adds some error checking to a simple Apps Script project.

Source: Unit Testing in GAS Part 4: Error Handling | ohhey[blog]