Skip to content

salesforce: deep dive on unit tests #666

@josephjclark

Description

@josephjclark

Once the new salesforce API is stabilised, I want to do a deep dive on unit testing

We should use unidici mocks to mock out the requests.

I want a really clean mock API with good clean, re-usable mock data. I am tempted to bring #482 into this, although there's unrelated stuff in that PR.

I want to set a standard for unit tests on core adaptors here. We should test the happy path and different options, expand references, and error handling.

Every Operation should have a bunch of tests:

  • basic functionality (ie, writes to state.data)
  • expandable references
  • any particularly complex options need a test
  • common error patterns

I probably wouldn't bother testing references

Tests should be small, focused and precise. Each test should test exactly one thing, and do it thoroughly

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    Status

    DevX Backlog

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions