Skip to content

Commit 79119f0

Browse files
author
Gal C
committed
unify all tests under the same folder
1 parent 1f7bd41 commit 79119f0

10 files changed

Lines changed: 17 additions & 17 deletions

jest.config.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ module.exports = {
77
'node_modules/(?!(react-native|@react-native|@react-navigation|react-native-ui-lib|rn-navio|expo-.*|@expo/.*|@testing-library/react-native)/)',
88
],
99
testMatch: [
10-
'**/__tests__/**/*.(ts|tsx|js|jsx)',
10+
'**/tests/unit/**/*.(ts|tsx|js|jsx)',
1111
'**/*.(test|spec).(ts|tsx|js|jsx)',
1212
],
1313
moduleNameMapper: {
-148 Bytes
Loading
544 Bytes
Loading
473 Bytes
Loading
Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
import { renderHook, act } from '@testing-library/react-native';
22
import { Keyboard } from 'react-native';
33

4-
import useAuth from '../../../src/screens/login/useAuth';
5-
import { navigationService } from '../../../src/services/navigationService';
6-
import { authStore } from '../../../src/store/authStore';
4+
import useAuth from '../../../../src/screens/login/useAuth';
5+
import { navigationService } from '../../../../src/services/navigationService';
6+
import { authStore } from '../../../../src/store/authStore';
77

88
// Mock dependencies
99
jest.mock('react-native', () => ({
@@ -12,9 +12,9 @@ jest.mock('react-native', () => ({
1212
},
1313
}));
1414

15-
jest.mock('../../../src/store/authStore');
16-
jest.mock('../../../src/services/navigationService');
17-
jest.mock('../../../src/utils');
15+
jest.mock('../../../../src/store/authStore');
16+
jest.mock('../../../../src/services/navigationService');
17+
jest.mock('../../../../src/utils');
1818

1919
const mockKeyboard = Keyboard as jest.Mocked<typeof Keyboard>;
2020

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@ import axios, {
44
InternalAxiosRequestConfig,
55
} from 'axios';
66

7-
import { BaseService } from '../../src/services/BaseService';
8-
import { IAuthStore, IUserStore } from '../../src/store/types';
7+
import { BaseService } from '../../../src/services/BaseService';
8+
import { IAuthStore, IUserStore } from '../../../src/store/types';
99

1010
// Mock dependencies
1111
jest.mock('axios');
Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
import { when } from 'mobx';
22

3-
import { authStore } from '../../src/store/authStore';
4-
import { userStore } from '../../src/store/userStore';
3+
import { authStore } from '../../../src/store/authStore';
4+
import { userStore } from '../../../src/store/userStore';
55

66
// Mock the dependencies
7-
jest.mock('../../src/services');
8-
jest.mock('../../src/store/userStore');
9-
jest.mock('../../src/services/navigationService');
7+
jest.mock('../../../src/services');
8+
jest.mock('../../../src/store/userStore');
9+
jest.mock('../../../src/services/navigationService');
1010

1111
describe('AuthStore', () => {
1212
let mockAuthService: {
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { formatDate } from '../../src/utils';
1+
import { formatDate } from '../../../src/utils';
22

33
describe('formatDate', () => {
44
it('should format a valid date string correctly', () => {
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { emailValidation } from '../../src/utils';
1+
import { emailValidation } from '../../../src/utils';
22

33
describe('emailValidation', () => {
44
it('should return true for valid email addresses', () => {
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { lengthValidation } from '../../src/utils';
1+
import { lengthValidation } from '../../../src/utils';
22

33
describe('lengthValidation', () => {
44
describe('with default parameters (6-30 characters)', () => {

0 commit comments

Comments
 (0)