I often write Google Apps Script (GAS) projects that rely on XmlService, but I found it hard to test them locally. So I created *@yoshi389111/fake-xmlservice*, an npm package that implements XmlService in Node.js.
- Works with Jest (e.g., put it in `setupFilesAfterEnv`) - Allows local unit tests for GAS code using XmlService - Supports parsing and serializing XML (partially complete, not 100%) - API is designed to be a drop-in replacement for GAS's XmlService
Repo: <https://github.com/yoshi389111/fake-xmlservice>
Package: <https://www.npmjs.com/package/@yoshi389111/fake-xmlservice>
It's not fully complete yet, but it already works for my use cases. I'd love feedback on:
- What features you'd expect in a testing library for GAS XmlService - Any edge cases you ran into with XmlService in your projects
Thanks!
Comments URL: https://news.ycombinator.com/item?id=45402513
Points: 1
# Comments: 0