Skip to content

Commit c3eec3c

Browse files
authored
Add ability to use to use metric and/or imperial system (#66)
* Add ability to use to use metric or imperial system. * Add ListChoiceDialog and handle default unit system setting. * ListChoiceDialog scrollable prop. * Add weight_unit to WorkoutExerciseSchema and show and save weight in kg or lbs depending on default unit system setting. * Make edit sets with paper form work with lb. * Change default + and - weight and reps buttons. * Detect default unit system by country on the first time app is installed. * Add unit tests for kg vs lb. * Add snapshot-diff and test to compare max sets vs normal sets. * Add unit tests for edit sets with controls for kg vs lbs.
1 parent d508fbe commit c3eec3c

37 files changed

+1586
-521
lines changed

.flowconfig

+1
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@ node_modules/react-native/Libraries/react-native/react-native-interface.js
3737
node_modules/react-native/flow/
3838
node_modules/react-native/flow-github/
3939
node_modules/react-navigation/flow/react-navigation.js
40+
flow-typed/.*
4041

4142
[options]
4243
emoji=true

config/setupTests.js

+7
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,13 @@
55
import Enzyme from 'enzyme';
66
import Adapter from 'enzyme-adapter-react-16';
77

8+
const snapshotDiff = require('snapshot-diff');
9+
10+
const { toMatchDiffSnapshot } = snapshotDiff;
11+
12+
expect.addSnapshotSerializer(snapshotDiff.getSnapshotDiffSerializer());
13+
expect.extend({ toMatchDiffSnapshot });
14+
815
Enzyme.configure({ adapter: new Adapter() });
916

1017
// We never want to call the real methods of this module (or bad things are going to happen)

0 commit comments

Comments
 (0)