Groups keyboard shortcuts have been updated
Dismiss
See shortcuts

Report current running Node and Apps Script code

33 views
Skip to first unread message

Bruce Mcpherson

unread,
Feb 21, 2025, 6:09:55 AMFeb 21
to Google Apps Script Community

Report current running Node and Apps Script code
Intially 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-locator
article here https://ramblings.mcpher.com/report-current-running-node-and-apps-script-code/
Reply all
Reply to author
Forward
0 new messages