We’ve looked at how to install and configure QUnit and just finished writing some simple tests. In this post, we’re going to write a new method,
add(a, b)
inCalcs
which will add the two passed parameters.
Part 3 in the unit testing series, this post looks at writing tests for new methods and some considerations for when (or when not) to use private functions in Javascript when it comes to testing.
Source: Unit Testing GAS Part 3: Adding and Testing Functions | ohhey[blog]
I’m a public school teacher writing Apps Script projects to manage documentation and to make life easier in general. You can read more on my blog, blog.ohheybrian.com or follow me on Twitter, @bennettscience.