Skip to content

Instantly share code, notes, and snippets.

@petebarber
Created August 28, 2017 11:19
Show Gist options
  • Save petebarber/ea4f0e41cbd7d764993db842e1afd4e5 to your computer and use it in GitHub Desktop.
Save petebarber/ea4f0e41cbd7d764993db842e1afd4e5 to your computer and use it in GitHub Desktop.
'use strict';
const assert = require("assert");
const sinon = require("sinon");
const aws = require("aws-sdk");
const spawn = require("child_process").spawn;
aws.config.update({region: "us-east-1" });
describe("awsLambdaToTest", function()
{
let dynamoInstance;
let db;
beforeEach(function()
{
dynamoInstance = spawn('/usr/local/bin/dynamodb-local', ['-inMemory']);
db = new aws.DynamoDB({ endpoint: "http://localhost:8000" });
});
afterEach(() => dynamoInstance.kill());
// Tests...
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment