Skip to content

[Tests] Mock data for Lob API #612

@Alex-is-Gonzalez

Description

@Alex-is-Gonzalez

Context

Lob is used to store addresses where letters go. While there is an address verification mechanism, there are edge cases such as satellites, non-residential, and POs to consider

Files to have open: lob.js, https://github.com/ProgramEquity/amplify/blob/main/server/__tests__/integration/lob.test.js

Tasks:

  • Create a mocks model file for addresses
    • Copilot prompt while lob.jest.js open: where would I create mock files
  • Create an array of addresses across edge cases
    • Copilot prompt:
      • How can I use Jest to mock API calls in my tests?
      • In Lob.js Highlight lines 256-281: Mock data for edge cases
      • In Lob.test.js Highlight lines 264-272: Mock data for test

Metadata

Metadata

Assignees

Labels

Type

No type
No fields configured for issues without a type.

Projects

Status
No status
Status
No status

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions