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

fix(mock): add interpolate to mock #2895

Merged
merged 1 commit into from Jan 28, 2022

Conversation

Krisztiaan
Copy link
Contributor

Description

interpolate is not a function was encountered during test when reanimated is mocked, it was, in fact, missing from mock.js

Changes

add interpolate to mock.js

Test code and steps to reproduce

// jest.setup.js
jest.mock('react-native-reanimated', () => require('react-native-reanimated/mock'));

Test render a component that has interpolation.

Checklist

  • [?] Included code example that can be used to test this change
  • Updated TS types
  • Added TS types tests
  • Added unit / integration tests
  • Updated documentation
  • Ensured that CI passes

@piaskowyk
Copy link
Member

Thanks! 🚀

@piaskowyk piaskowyk merged commit 2bbdcef into software-mansion:main Jan 28, 2022
@Krisztiaan Krisztiaan deleted the patch-1 branch January 28, 2022 13:41
yiheyang pushed a commit to yiheyang/taro-reanimated that referenced this pull request Feb 3, 2022
## Description

`interpolate is not a function` was encountered during test when `reanimated` is mocked, it was, in fact, missing from `mock.js`

## Changes

add `interpolate` to `mock.js`

## Test code and steps to reproduce

```js
// jest.setup.js
jest.mock('react-native-reanimated', () => require('react-native-reanimated/mock'));
```

Test render a component that has interpolation.

## Checklist

- [?] Included code example that can be used to test this change
- [ ] Updated TS types
- [ ] Added TS types tests
- [ ] Added unit / integration tests
- [ ] Updated documentation
- [ ] Ensured that CI passes
@Krisztiaan Krisztiaan mentioned this pull request Feb 5, 2022
5 tasks
piaskowyk pushed a commit that referenced this pull request Feb 5, 2022
## Description

`interpolateColor is not a function` was encountered during test when `reanimated` is mocked, it was, in fact, missing from `mock.js`

I think there's more of this (#2895), what's a good way to add all of the missing ones?

## Changes

add `interpolateColor` to `mock.js`

## Test code and steps to reproduce

```js
// jest.setup.js
jest.mock('react-native-reanimated', () => require('react-native-reanimated/mock'));
```

Test render a component that has interpolateColors.

## Checklist

- [?] Included code example that can be used to test this change
- [ ] Updated TS types
- [ ] Added TS types tests
- [ ] Added unit / integration tests
- [ ] Updated documentation
- [ ] Ensured that CI passes
alexandrius pushed a commit to ExodusMovement/react-native-reanimated that referenced this pull request Feb 14, 2022
## Description

`interpolateColor is not a function` was encountered during test when `reanimated` is mocked, it was, in fact, missing from `mock.js`

I think there's more of this (software-mansion#2895), what's a good way to add all of the missing ones?

## Changes

add `interpolateColor` to `mock.js`

## Test code and steps to reproduce

```js
// jest.setup.js
jest.mock('react-native-reanimated', () => require('react-native-reanimated/mock'));
```

Test render a component that has interpolateColors.

## Checklist

- [?] Included code example that can be used to test this change
- [ ] Updated TS types
- [ ] Added TS types tests
- [ ] Added unit / integration tests
- [ ] Updated documentation
- [ ] Ensured that CI passes
aeddi pushed a commit to aeddi/react-native-reanimated that referenced this pull request Mar 22, 2022
## Description

`interpolate is not a function` was encountered during test when `reanimated` is mocked, it was, in fact, missing from `mock.js`

## Changes

add `interpolate` to `mock.js`

## Test code and steps to reproduce

```js
// jest.setup.js
jest.mock('react-native-reanimated', () => require('react-native-reanimated/mock'));
```

Test render a component that has interpolation.

## Checklist

- [?] Included code example that can be used to test this change
- [ ] Updated TS types
- [ ] Added TS types tests
- [ ] Added unit / integration tests
- [ ] Updated documentation
- [ ] Ensured that CI passes
aeddi pushed a commit to aeddi/react-native-reanimated that referenced this pull request Mar 22, 2022
## Description

`interpolateColor is not a function` was encountered during test when `reanimated` is mocked, it was, in fact, missing from `mock.js`

I think there's more of this (software-mansion#2895), what's a good way to add all of the missing ones?

## Changes

add `interpolateColor` to `mock.js`

## Test code and steps to reproduce

```js
// jest.setup.js
jest.mock('react-native-reanimated', () => require('react-native-reanimated/mock'));
```

Test render a component that has interpolateColors.

## Checklist

- [?] Included code example that can be used to test this change
- [ ] Updated TS types
- [ ] Added TS types tests
- [ ] Added unit / integration tests
- [ ] Updated documentation
- [ ] Ensured that CI passes
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.

None yet

2 participants