@labdigital/mock-dynamodb
v0.2.1
Published
Mock DynamoDB for testing using dynalite
Downloads
145
Readme
DynamoDB Mock
This is a relatively simple wrapper around dynalite to make it easier to use in a test environment.
Usage
import { mockDynamoDB } from "@labdigital/mock-dynamodb";
const mddb = mockDynamoDB({ endpoint: "http://localhost:4000" });
const client = new DynamoDB({
endpoint: "http://localhost:4000",
region: "local",
credentials: {
accessKeyId: "fake-x",
secretAccessKey: "fake",
},
});
mddb.reset(); // Clear all data
mddb.stop(); // Stop the server