index.js
function (tableName, partitionKeyName, attributesName) {
		'use strict';
		if (!tableName) {
			throw "'tableName' argument must be provided.";
		}
		this.dynamoDBTable = tableName;
		this.partitionKeyName = partitionKeyName || 'userId';
		this.attributesName = attributesName || 'mapAttr';
		
		let self = this;
		AWSMOCK.mock('DynamoDB.DocumentClient', 'get', (params, callback) => {
			// Do not inline; resolution has to take place on call
			self.dynamoDBGetMock(params, callback);
		});
		AWSMOCK.mock('DynamoDB.DocumentClient', 'put', (params, callback) => {
			// Do not inline; resolution has to take place on call
			self.dynamoDBPutMock(params, callback);
		});
	}
function (tableName, partitionKeyName, attributesName) {
		'use strict';
		if (!tableName) {
			throw "'tableName' argument must be provided.";
		}
		this.dynamoDBTable = tableName;
		this.partitionKeyName = partitionKeyName || 'userId';
		this.attributesName = attributesName || 'mapAttr';
		
		let self = this;
		AWSMOCK.mock('DynamoDB.DocumentClient', 'get', (params, callback) => {
			// Do not inline; resolution has to take place on call
			self.dynamoDBGetMock(params, callback);
		});
		AWSMOCK.mock('DynamoDB.DocumentClient', 'put', (params, callback) => {
			// Do not inline; resolution has to take place on call
			self.dynamoDBPutMock(params, callback);
		});
	}
function ( tableName , partitionKeyName , attributesName ) { 'use strict' ; if ( ! tableName ) { throw "'tableName' argument must be provided." ; } this . dynamoDBTable = tableName ; this . partitionKeyName = partitionKeyName || 'userId' ; this . attributesName = attributesName || 'mapAttr' ; let self = this ; AWSMOCK . mock ( 'DynamoDB.DocumentClient' , 'get' , ( params , callback ) => { // Do not inline; resolution has to take place on call self . dynamoDBGetMock ( params , callback ) ; } ) ; AWSMOCK . mock ( 'DynamoDB.DocumentClient' , 'put' , ( params , callback ) => { // Do not inline; resolution has to take place on call self . dynamoDBPutMock ( params , callback ) ; } ) ; }
Activates mocking of DynamoDB backed attributes
@param {string} tableName name of the DynamoDB Table
@param {string} partitionKeyName the key to be used as id (default: userId)
@param {string} attributesName the key to be used for the attributes (default: mapAttr)
Activates mocking of DynamoDB backed attributes