Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

salesforce: deep dive on unit tests #666

Open
josephjclark opened this issue Jul 4, 2024 · 0 comments
Open

salesforce: deep dive on unit tests #666

josephjclark opened this issue Jul 4, 2024 · 0 comments

Comments

@josephjclark
Copy link
Collaborator

josephjclark commented Jul 4, 2024

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

@github-project-automation github-project-automation bot moved this to New Issues in v2 Jul 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: New Issues
Development

No branches or pull requests

1 participant