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

[#266] Expose additional jest mocks alongside "regular" mocks #267

Merged
merged 3 commits into from
Jul 31, 2024

Conversation

erheron
Copy link
Contributor

@erheron erheron commented Jul 25, 2024

Summary

This solves #266 by exposing additional jest mocks alongside "regular" mocks.

I've also added a type test to verify that mocks are in sync

README is not yet updated. If there is a positive feedback on this PR, I'll update README as well 👌🏻

Test Plan

What's required for testing (prerequisites)?

Repository with jest and typescript set up

What are the steps to test it (after prerequisites)?

Follow an example from #266

Compatibility

OS Implemented
iOS
Android

Checklist

  • I have tested this on a device and a simulator
  • I added the documentation in README.md
  • I added a sample use of the API in the example project (example/src/App.js)

@erheron erheron requested a review from zoontek as a code owner July 25, 2024 13:23
mock/jest-mocks.ts Outdated Show resolved Hide resolved
mock/verify-mocks-compatibility.ts Outdated Show resolved Hide resolved
package.json Outdated Show resolved Hide resolved
example/android/gradlew.bat Outdated Show resolved Hide resolved
@zoontek zoontek force-pushed the 266-new-jest-mocks branch from 3fb2f7d to f37ce87 Compare July 30, 2024 08:57
@zoontek
Copy link
Owner

zoontek commented Jul 30, 2024

I made a few changes, could you check it works well for you?

.gitignore Show resolved Hide resolved
@erheron
Copy link
Contributor Author

erheron commented Jul 30, 2024

I made a few changes, could you check it works well for you?

@zoontek sure! I've just checked it and it seems to work 🚀

@zoontek zoontek merged commit fc07048 into zoontek:master Jul 31, 2024
@erheron
Copy link
Contributor Author

erheron commented Jul 31, 2024

Oh @zoontek I actually realized we've never updated any docs... Shall I do that in a follow-up PR?

@zoontek
Copy link
Owner

zoontek commented Jul 31, 2024

@erheron I did it 🙂

github-merge-queue bot referenced this pull request in valora-inc/wallet Sep 6, 2024
This PR contains the following updates:

| Package | Change | Age | Adoption | Passing | Confidence |
|---|---|---|---|---|---|
|
[react-native-localize](https://github.com/zoontek/react-native-localize)
| [`^3.1.0` ->
`^3.2.1`](https://renovatebot.com/diffs/npm/react-native-localize/3.1.0/3.2.1)
|
[![age](https://developer.mend.io/api/mc/badges/age/npm/react-native-localize/3.2.1?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![adoption](https://developer.mend.io/api/mc/badges/adoption/npm/react-native-localize/3.2.1?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![passing](https://developer.mend.io/api/mc/badges/compatibility/npm/react-native-localize/3.1.0/3.2.1?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/react-native-localize/3.1.0/3.2.1?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|

---

### Release Notes

<details>
<summary>zoontek/react-native-localize (react-native-localize)</summary>

###
[`v3.2.1`](https://github.com/zoontek/react-native-localize/releases/tag/3.2.1)

[Compare
Source](https://github.com/zoontek/react-native-localize/compare/3.2.0...3.2.1)

- Expose additional `jest` mocks alongside "regular" mocks by
[@&#8203;erheron](https://github.com/erheron) in
[https://github.com/zoontek/react-native-localize/pull/267](https://github.com/zoontek/react-native-localize/pull/267)

###
[`v3.2.0`](https://github.com/zoontek/react-native-localize/releases/tag/3.2.0)

[Compare
Source](https://github.com/zoontek/react-native-localize/compare/3.1.0...3.2.0)

- Add support for Android temperature unit regional preference (part of
[https://github.com/zoontek/react-native-localize/issues/248](https://github.com/zoontek/react-native-localize/issues/248))

</details>

---

### Configuration

📅 **Schedule**: Branch creation - "after 5pm,every weekend" in timezone
America/Los_Angeles, Automerge - "after 5pm,every weekend" in timezone
America/Los_Angeles.

🚦 **Automerge**: Enabled.

♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the
rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about this update
again.

---

- [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check
this box

---

This PR was generated by [Mend Renovate](https://mend.io/renovate/).
View the [repository job
log](https://developer.mend.io/github/valora-inc/wallet).

<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzOC41OS4yIiwidXBkYXRlZEluVmVyIjoiMzguNTkuMiIsInRhcmdldEJyYW5jaCI6Im1haW4iLCJsYWJlbHMiOlsibnBtIiwicmVub3ZhdGUiXX0=-->

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: valora-bot <valorabot@valoraapp.com>
Co-authored-by: Jean Regisser <jean.regisser@gmail.com>
github-merge-queue bot referenced this pull request in valora-inc/wallet Sep 6, 2024
This PR contains the following updates:

| Package | Change | Age | Adoption | Passing | Confidence |
|---|---|---|---|---|---|
|
[react-native-localize](https://github.com/zoontek/react-native-localize)
| [`^3.1.0` ->
`^3.2.1`](https://renovatebot.com/diffs/npm/react-native-localize/3.1.0/3.2.1)
|
[![age](https://developer.mend.io/api/mc/badges/age/npm/react-native-localize/3.2.1?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![adoption](https://developer.mend.io/api/mc/badges/adoption/npm/react-native-localize/3.2.1?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![passing](https://developer.mend.io/api/mc/badges/compatibility/npm/react-native-localize/3.1.0/3.2.1?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/react-native-localize/3.1.0/3.2.1?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|

---

### Release Notes

<details>
<summary>zoontek/react-native-localize (react-native-localize)</summary>

###
[`v3.2.1`](https://github.com/zoontek/react-native-localize/releases/tag/3.2.1)

[Compare
Source](https://github.com/zoontek/react-native-localize/compare/3.2.0...3.2.1)

- Expose additional `jest` mocks alongside "regular" mocks by
[@&#8203;erheron](https://github.com/erheron) in
[https://github.com/zoontek/react-native-localize/pull/267](https://github.com/zoontek/react-native-localize/pull/267)

###
[`v3.2.0`](https://github.com/zoontek/react-native-localize/releases/tag/3.2.0)

[Compare
Source](https://github.com/zoontek/react-native-localize/compare/3.1.0...3.2.0)

- Add support for Android temperature unit regional preference (part of
[https://github.com/zoontek/react-native-localize/issues/248](https://github.com/zoontek/react-native-localize/issues/248))

</details>

---

### Configuration

📅 **Schedule**: Branch creation - "after 5pm,every weekend" in timezone
America/Los_Angeles, Automerge - "after 5pm,every weekend" in timezone
America/Los_Angeles.

🚦 **Automerge**: Enabled.

♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the
rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about this update
again.

---

- [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check
this box

---

This PR was generated by [Mend Renovate](https://mend.io/renovate/).
View the [repository job
log](https://developer.mend.io/github/valora-inc/wallet).

<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzOC41OS4yIiwidXBkYXRlZEluVmVyIjoiMzguNTkuMiIsInRhcmdldEJyYW5jaCI6Im1haW4iLCJsYWJlbHMiOlsibnBtIiwicmVub3ZhdGUiXX0=-->

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: valora-bot <valorabot@valoraapp.com>
Co-authored-by: Jean Regisser <jean.regisser@gmail.com>
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.

2 participants