Skip to content

Commit

Permalink
raw:list working
Browse files Browse the repository at this point in the history
  • Loading branch information
gagoar committed May 12, 2020
1 parent 79b52d7 commit a205a1c
Show file tree
Hide file tree
Showing 19 changed files with 9,288 additions and 0 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
node_modules
.vscode/
21 changes: 21 additions & 0 deletions index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
import { Context } from "aws-lambda";
import lambda, { Event } from "./src/index";
import { logger } from "./src/utils/debug";

const TASK_ID = "HANDLER";
const log = logger(TASK_ID);
export const handler = (
event: Event,
_context: Context,
callback: Function
) => {
lambda(event)
.then(data => {
log(`SUCCESS: ${data}`);
callback(null, data);
})
.catch(err => {
log(`ERROR: ${err}`);
callback(err);
});
};
28 changes: 28 additions & 0 deletions jest.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
module.exports = {
globals: {
"ts-jest": {
disableSourceMapSupport: true,
},
},
verbose: true,
transform: {
"^.+\\.tsx?$": "ts-jest",
},
preset: "ts-jest",
node: true,
moduleFileExtensions: ["ts", "tsx", "js", "jsx", "json", "node"],
testURL: "http://localhost",
transformIgnorePatterns: ["[/\\\\]node_modules[/\\\\].+\\.(js|jsx)$"],
testMatch: ["**/*.(spec|test).{ts,tsx}"],
collectCoverage: true,
collectCoverageFrom: [
"config/**/*.{ts,tsx}",
"src/**/*.{ts,tsx}",
"!src/naptime/**/*",
],
coverageDirectory: "./coverage/",
watchPlugins: [
require.resolve("jest-watch-typeahead/filename"),
require.resolve("jest-watch-typeahead/testname"),
],
};
Loading

0 comments on commit a205a1c

Please sign in to comment.