Fork me on Github

Fork me on GitHub

Mar 11, 2012

Google Apps Script - Find from right

I am getting familiar with Google Spreadsheets and Google Apps Script.

For a sheet used for expense tracking I needed a findFromRight function in Google Apps Script.

I let myself be inspired from the Excel VBA world and found something from Chris Rae's site that could be modified:



To add testing to this Google Apps Script, I decided to try out the GAS-Unit testing framework.




There are two ways to view the test results. The code above only prints to the log view (View-> Logs in the menus). It is also possible to receive the test result as a formatted report per mail (by including the outcommented line and updating the email address).

All in all, I find that using the testing framework can be of good help to establish that the functions are working as expected (and keep working as expected when redesigned).

No comments:

Post a Comment