Skip to content

fix: apex automock not returning a resolved promise #231

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

Merged
merged 1 commit into from
Jun 24, 2021

Conversation

jodarove
Copy link
Contributor

@jodarove jodarove commented Jun 24, 2021

Details

fixes #230

#208 automocks apex and apexContinuation methods with the correct test wire adapter instead of those provided by the @lwc/jest-transformer (apex, apexContinuation). However, it does not implement correctly the mocked function that is used when invoking imperatively the apex method (the correct implementation is defined here).

This PR mocks the implementation of the apex method to return a resolved promise.

@jodarove jodarove merged commit 544f95a into master Jun 24, 2021
@jodarove jodarove deleted the jodarove/apex-method-default-impl branch June 24, 2021 17:19
jodarove added a commit that referenced this pull request Jun 29, 2021
jodarove added a commit that referenced this pull request Jun 30, 2021
…235)

This reverts commit 0cc034d.

This PR reverts #210, and #208 (#231 was never included in summer21 branch). They provided functionality to auto mock apex methods.

**Notes:**
- Test authors will need to keep implementing their own apex (+apexContinuation) methods mocks after this PR is merged.
- These changes were added to the summer21 branch with #224.
jodarove added a commit that referenced this pull request Jun 30, 2021
…utomocks (#234)

fixes #232

This PR reverts #231, #210, and #208. They provided functionality to auto mock apex methods.

**Note:** Test authors will need to keep implementing their own apex (+apexContinuation) methods mocks after this PR is merged.

* Revert "fix: apex automock should return a resolved promise (#231)"

This reverts commit 544f95a.

* Revert "fix: add apex stubs to the transformIgnorePatterns (#210)"

This reverts commit fe8381a.

* Revert "fix: automock apex methods with valid wire adapters (#208)"

This reverts commit 125c689.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Error when testing a component that invokes an apex method which return value is not mocked
3 participants