Report current running Node and Apps Script codeIntially I wanted to enhance my
Apps Script Unit tester now with ava style option to include displaying the actual code that was being tested (much handier than going back and forwards to the source). However I figured that this module might be useful to others who want enhanced logging and debugging, or who have created their own unit test runner and want to enhance it.
What’s more, it comes as both an npm module and an
Apps Script library without (much) need for code changes.
Example output/home/bruce/bm/code-locator/test/test.js
13:
14: math ("sqrt", 2)
15:--> math ("rubbish", 0)
16: math ("pow", 2, 3)
17: math ("nonsense")
/home/bruce/bm/code-locator/test/test.js
15: math ("rubbish", 0)
16: math ("pow", 2, 3)
17:--> math ("nonsense")
18: math ("round", 1.3)
19:
api docs here:
https://github.com/brucemcpherson/code-locatorarticle here
https://ramblings.mcpher.com/report-current-running-node-and-apps-script-code/