1.0.0 • Published 7 years ago

npm-dynamo-database-cleaner v1.0.0

Weekly downloads
3
License
ISC
Repository
github
Last release
7 years ago

Installation

  • npm install --save git+ssh://git@github.com/Vin65/npm-dynamo-db-cleaner.git#master

Usage

DatabaseCleaner

  • Add const DatabaseCleaner = require('npm-dynamo-db-cleaner); to make DatabaseCleaner constructor available to your code.

  • To create a new DatabaseCleaner instance, call `new DatabaseCleaner(dynamo)

  • To erase some records from a test dynamo database use the DatabseCleaner.delteAllItemsForTable(tableName, Keys, cb)

    • tableName is the name of the dynamo table (Required)
    • keys is an array with the partition keys (Required)
    • the cb(callback) is a function to be called after, usually a done() for asynchronous mocha tests. (Optional)