dooboolab-community / dooboo-native-ts

Complete boilerplate for react-native app. Contains, typescript, react-hook, context-api, ts-jest, localization, navigation and etc.
https://medium.com/dooboolab/announcing-dooboo-cli-v3-5c9fceeb2ac4
MIT License
81 stars 27 forks source link

Web support in 0.63.0 release #161

Closed hyochan closed 3 years ago

hyochan commented 3 years ago

This PR is pushed to release/0.63.0 with web support.

codecov[bot] commented 3 years ago

Codecov Report

Merging #161 (51da5b4) into release/0.63.0 (9c9ec79) will decrease coverage by 8.27%. The diff coverage is 82.19%.

@@                Coverage Diff                 @@
##           release/0.63.0     #161      +/-   ##
==================================================
- Coverage           97.00%   88.72%   -8.28%     
==================================================
  Files                  12       15       +3     
  Lines                 100      133      +33     
  Branches               12       22      +10     
==================================================
+ Hits                   97      118      +21     
- Misses                  1        7       +6     
- Partials                2        8       +6     
0916dhkim commented 3 years ago

useHeaderHeight can be mocked like this:

jest.mock('@react-navigation/stack', () => ({
  ...jest.requireActual('@react-navigation/stack'),
  useHeaderHeight: () => 12,
}));
hyochan commented 3 years ago
jest.mock('@react-navigation/stack', () => ({
  ...jest.requireActual('@react-navigation/stack'),
  useHeaderHeight: () => 12,
}));

Ah! This is really great. I've just fixed this. I thought the context could be mocked only when inside the provider like stackoverflow.

hyochan commented 3 years ago

Closes in favor of #162. #160 has been merged to master.