coforma / swift-tech-challenge

MIT License
0 stars 0 forks source link

add dynamodb lib #52

Closed gmrabian closed 6 months ago

gmrabian commented 6 months ago

Summary

Since our data goes through some processing before storing it in the database we will use the AWS database for local development. This saves time in ensuring both local and deployed instances go through a similar seeding process.

Fixes #23

Type of change

Please delete options that are not relevant.

How To Test

Temporarily modify your PageHeader as follows

import dynamoClient from "../../utils/dynamodb-lib";

export const PageHeader = async () => {
  const params = {
    TableName: "institutions",
    Key: { institutionId: 110608, recordType: "data" },
  };
  const response = await dynamoClient.get(params);
  console.log("response", response);
...

Checklist:

gmrabian commented 6 months ago

Need help resolving the test issue. I think it's likely a compatibility issue between Jest, Next, Typescript, or something similar.

Some references I found: https://stackoverflow.com/questions/71427330/nextjs-jest-transform-transformignorepatterns-not-working-with-esm-modules https://github.com/react-dnd/react-dnd/issues/3443 https://stackoverflow.com/questions/49263429/jest-gives-an-error-syntaxerror-unexpected-token-export