Skip to content

Instantly share code, notes, and snippets.

View busticated's full-sized avatar

Busticated busticated

View GitHub Profile
@busticated
busticated / example.test.mjs
Last active November 12, 2023 01:48
How to use ARC's / AWS' `client._doc.transactWrite()` method?
// Trying to implement field uniqueness as described in:
// https://aws.amazon.com/blogs/database/simulating-amazon-dynamodb-unique-constraints-using-transactions/
// Using:
// mocha: v10.2.0
// node: v18.18.2
// macOS: Sonoma v14.1 (23B74)
import sinon from 'sinon'; // sinon@17.0.1