Skip to content

Instantly share code, notes, and snippets.

@jamestharpe
Created October 12, 2018 11:54
Show Gist options
  • Save jamestharpe/83d23062390cabcd23aeca06b37600e6 to your computer and use it in GitHub Desktop.
Save jamestharpe/83d23062390cabcd23aeca06b37600e6 to your computer and use it in GitHub Desktop.
Run Mocha TypeScript Tests Against Serverless Framework with Local DynamoDB Instance
{
"name": "your-severless-application",
"version": "0.1.0",
"description": "Your description",
"main": "src/index.js",
"scripts": {
"test": "serverless offline start --migrate --exec \"mocha -r ts-node/register ./src/**/*.spec.ts\"",
"start": "serverless offline start",
},
"devDependencies": {
"@types/chai": "^4.1.3",
"@types/chai-as-promised": "^7.1.0",
"@types/mocha": "^5.2.0",
"@types/node": "^8.0.57",
"@types/sinon": "^5.0.5",
"@types/sinon-chai": "^3.2.0",
"@types/sinon-express-mock": "^1.3.5",
"chai": "^4.1.2",
"chai-as-promised": "^7.1.1",
"mocha": "^5.1.1",
"serverless-dynamodb-local": "^0.2.30",
"serverless-offline": "^3.20.3",
"serverless-webpack": "^4.0.0",
"sinon": "^6.3.5",
"sinon-chai": "^3.2.0",
"sinon-express-mock": "^2.0.5",
"source-map-support": "^0.5.6",
"ts-loader": "^2.3.7",
"ts-node": "^6.0.2",
"typescript": "^2.8.3",
"webpack": "^3.6.0"
},
"author": "James Tharpe",
"license": "UNLICENSED",
"dependencies": {
"aws-sdk": "^2.235.1",
"serverless-http": "^1.5.5",
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment