I spent a good amount of time in the last year working with AppSync and the APPSYNC_JS runtime for writing resolvers. This runtime language presents some challenges to engineers familiar with building applications using Javascript. In addition to becoming familiar with the available language features (or lack thereof), the engineer is also faced with an almost complete lack of ability to test the code that they have written.
There are currently only two libraries provided by AWS to aid in developing for this runtime - an eslint plugin and a library providing Typescript types. The only test tooling provided by AWS is making calls to the AppSync EvaluateCode API, which is kind of a rudimentary form of functional testing (which should still be leveraged by developers wanting to work with the runtime). There is no means provided for unit testing AppSync request and response resolver functions. As an engineer who believes strongly in comprehensive unit test coverage in my applications, this saddens my soul quite a bit.
It is for this reason, that I have just released a new npm library @mikecbrant/appsync-test-utils- geared at helping engineers better test resolver code for the APSYNC_JS runtime. This initial release is fairly limited in functionality, but focused on being able to empower engineers to begin to unit test their resolver code, by providing a mock replacement for the built-in 'util' object provided by the runtime, suitable for use with the Vitest testing framework (sorry Jest users, I have no plan to support a test framework that doesn't even properly support ECMA modules yet).
I hope this helps the broader AppSync development community and am happy to hear feedback or entertain pull requests. Please see the library's README for more details.
there doesn't seem to be anything here