Skip to content
This repository was archived by the owner on Sep 22, 2025. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 24 additions & 0 deletions jest/setup.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,27 @@ jest.mock('react-native-reanimated', () => {

// Silence the warning: Animated: `useNativeDriver` is not supported because the native animated module is missing
jest.mock('react-native/Libraries/Animated/NativeAnimatedHelper');

// Mock react-native-date-picker
jest.mock('react-native-date-picker', () => {
const React = require('react');
const { View } = require('react-native');

return React.forwardRef((props, ref) => {
const { testID, onDateChange, date } = props;

// Create a mock component that can be interacted with in tests
const handleDateChange = (newDate) => {
if (onDateChange) {
onDateChange(newDate);
}
};

return React.createElement(View, {
testID: testID,
ref: ref,
onDateChange: handleDateChange,
date: date,
});
});
});
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -50,9 +50,10 @@
},
"dependencies": {
"postinstall-postinstall": "^2.1.0",
"react-native-date-picker": "^4.1.3",
"react-native-date-picker": "^5.0.13",
"react-native-paper": "^5.14.5",
"react-native-reanimated": "^3.17.5",
"react-native-safe-area-context": "^5.5.0",
"react-native-vector-icons": "^10.2.0"
},
"devDependencies": {
Expand Down
4 changes: 2 additions & 2 deletions src/components/PBSCPasswordStrength.js
Original file line number Diff line number Diff line change
Expand Up @@ -101,8 +101,8 @@ const PBSCPasswordStrength = (props) => {
})}
</View>
<View style={styles.suggestionsWrapper}>
{passwordStrength.suggestions.map((suggestion) => (
<Text>{`${suggestion}`}</Text>
{passwordStrength.suggestions.map((suggestion, index) => (
<Text key={index}>{`${suggestion}`}</Text>
))}
</View>
</View>
Expand Down
15 changes: 9 additions & 6 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -9735,12 +9735,10 @@ react-native-codegen@^0.0.7:
jscodeshift "^0.11.0"
nullthrows "^1.1.1"

react-native-date-picker@^4.1.3:
version "4.2.14"
resolved "https://registry.yarnpkg.com/react-native-date-picker/-/react-native-date-picker-4.2.14.tgz#ebeb3bf8d682268a4e405decde1e72ab95ecffb7"
integrity sha512-rP0ycj3I+8x4pIUGjeh7pL+cMPntKccLGX/OXx790bsIM0Hcyg0ZL86kGnnZu9fEUhXlgdr3OK/jhQue5L6kSQ==
dependencies:
prop-types "^15.8.1"
react-native-date-picker@^5.0.13:
version "5.0.13"
resolved "https://registry.npmjs.org/react-native-date-picker/-/react-native-date-picker-5.0.13.tgz#fe05f58652aaeee9e67f73cf7436c32a623ff3a4"
integrity sha512-qCLUODZVsJetO5zuoXjw1D39K527XWqBG8sOfhWdHyPzf13h8RXR1/RSKd1N0fdRDi5GdyizYmB0lPAK12/hbw==

react-native-gesture-handler@^2.4.2:
version "2.12.1"
Expand Down Expand Up @@ -9785,6 +9783,11 @@ react-native-reanimated@^3.17.5:
invariant "^2.2.4"
react-native-is-edge-to-edge "1.1.7"

react-native-safe-area-context@^5.5.0:
version "5.5.0"
resolved "https://registry.npmjs.org/react-native-safe-area-context/-/react-native-safe-area-context-5.5.0.tgz#8eb4ff66f405e83e77a1a2215a1ee731b77545e6"
integrity sha512-BQcSvVEJj3T4zBQH9YrnlfcLGHiVOsmeiE10PSBsmI/xyzULSZdJISFOH0HLcLU7/nePC+HsaaVzIsEa1CVBYw==

react-native-vector-icons@^10.2.0:
version "10.2.0"
resolved "https://registry.npmjs.org/react-native-vector-icons/-/react-native-vector-icons-10.2.0.tgz#f438f2ca16f7d6be658fd6ec8f0d2b7e2132b91c"
Expand Down