Skip to content

Commit

Permalink
FIX: TSC errors + Tests failing
Browse files Browse the repository at this point in the history
  • Loading branch information
KoudeIceTea committed Dec 11, 2024
1 parent 7440582 commit 87e9dde
Show file tree
Hide file tree
Showing 10 changed files with 10 additions and 5 deletions.
1 change: 1 addition & 0 deletions __tests__/unit/redux/slice/LoadingSlice.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ const { setLoading } = loadingSlice.actions;
describe('loadingSlice', () => {
it('should have the correct initial state', () => {
const initialState = loadingSlice.reducer(undefined, {
// @ts-ignore
type: undefined,
});
expect(initialState).toEqual({ isLoading: false });
Expand Down
1 change: 1 addition & 0 deletions __tests__/unit/redux/slice/NavigationSlice.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ const { showNavBar, updateSelectedNavBarRoute } = navigationActions;
describe('navigationSlice', () => {
it('should have the correct initial state', () => {
const initialState = navigationSlice.reducer(undefined, {
// @ts-ignore
type: undefined,
});
expect(initialState).toEqual({
Expand Down
1 change: 1 addition & 0 deletions __tests__/unit/redux/slice/NotificationSlice.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import {
describe('NotificationSlice', () => {
it('should have the correct initial state', () => {
const initialState = notificationSlice.reducer(undefined, {
// @ts-ignore
type: undefined,
});
expect(initialState).toEqual({ notifications: [] });
Expand Down
1 change: 1 addition & 0 deletions __tests__/unit/redux/slice/ThemeSlice.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ const { changeTheme, setHighContrastEnabled } = themeActions;
describe('themeSlice', () => {
it('should have the correct initial state', () => {
const initialState: ThemeState = themeSlice.reducer(undefined, {
// @ts-ignore
type: undefined,
});
expect(initialState).toEqual({
Expand Down
2 changes: 1 addition & 1 deletion jest-setup.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { useAppSelector } from './src/lib/redux/Hooks';
import { ThemeState } from './src/lib/redux/slices/ThemeSlice';

// Silence the warning: Animated: `useNativeDriver` is not supported because the native animated module is missing
jest.mock('react-native/Libraries/Animated/NativeAnimatedHelper');
// jest.mock('react-native/Libraries/Animated/NativeAnimatedHelper');
jest.mock('react-native-vector-icons/FontAwesome5', () => 'FontAwesome5');
jest.mock('react-native-webview', () => 'WebView');

Expand Down
2 changes: 1 addition & 1 deletion jest.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ module.exports = {
moduleFileExtensions: ['ts', 'tsx', 'js', 'jsx', 'json'],
setupFilesAfterEnv: ['./jest-setup.ts'],
transformIgnorePatterns: [
'node_modules/(?!(jest-)?react-native|@react-native|@react-native-community|@react-navigation|expo-font|expo-modules-core|expo-asset|expo-constants|expo-file-system|expo-status-bar)',
'node_modules/(?!(jest-)?react-native|@react-native|@react-native-community|@react-navigation|expo-font|expo-modules-core|expo-asset|expo-constants|expo-file-system|expo-status-bar|react-redux)',
],
moduleNameMapper: {
'\\.(ttf)$': '<rootDir>/fonts.js',
Expand Down
2 changes: 1 addition & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@
"jest": "^29.7.0",
"nyc": "^17.1.0",
"prettier": "^3.0.3",
"react-test-renderer": "^18.0.0",
"react-test-renderer": "^18.2.0",
"typescript": "^5.1.3"
},
"private": true,
Expand Down
1 change: 1 addition & 0 deletions src/components/WTR/Card/TechProviderCard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,7 @@ export function TechProviderCard({
testID={`tech-provider-${techProviderSlug}-button`}
>
<LinearGradient
// @ts-ignore
colors={colors.techProviderGradient}
style={styles.circle}
>
Expand Down
2 changes: 1 addition & 1 deletion src/lib/translations/i18n.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import { handleError } from '../utility/errorHandler';

i18n.use(initReactI18next) // passes i18n down to react-i18next
.init({
compatibilityJSON: 'v3',
compatibilityJSON: 'v4',
// the translations
// (tip move them in a JSON file and import them,
// or even better, manage them via a UI: https://react.i18next.com/guides/multiple-translation-files#manage-your-translations-with-a-management-gui)
Expand Down

0 comments on commit 87e9dde

Please sign in to comment.