Skip to content
Merged
Show file tree
Hide file tree
Changes from 5 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
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 = {
setupFilesAfterEnv: [
'<rootDir>/node_modules/@testing-library/jest-native/extend-expect',
],
testMatch: ['<rootDir>/src/__tests__/**/*.(test|spec).[jt]s?(x)'],
testMatch: ['<rootDir>/src/**/*.(test|spec).[jt]s?(x)'],
transformIgnorePatterns: [
'node_modules/(?!(react-native|@react-native|@react-navigation|react-native-screens|react-native-safe-area-context|react-native-gesture-handler|react-native-webview|react-native-vector-icons)/)',
],
Expand Down
13 changes: 7 additions & 6 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@
"add_build_info": "node scripts/autoCreatePackageInfo.js",
"example": "yarn workspace @iterable/react-native-sdk-example",
"test": "jest",
"test:watch": "jest --watch",
"test:coverage": "jest --coverage",
"typecheck": "tsc",
"lint": "eslint \"**/*.{js,ts,tsx}\"",
Expand Down Expand Up @@ -70,10 +71,10 @@
"@react-native/eslint-config": "0.79.3",
"@react-native/metro-config": "0.79.3",
"@react-native/typescript-config": "0.79.3",
"@react-navigation/native": "^6.1.18",
"@react-navigation/native": "^7.1.14",
"@release-it/conventional-changelog": "^9.0.2",
"@testing-library/jest-native": "^5.4.3",
"@testing-library/react-native": "^12.7.2",
"@testing-library/react-native": "^13.3.3",
"@types/jest": "^29.5.5",
"@types/react": "^19.0.0",
"@types/react-native-vector-icons": "^6.4.18",
Expand All @@ -91,11 +92,11 @@
"react": "19.0.0",
"react-native": "0.79.3",
"react-native-builder-bob": "^0.40.4",
"react-native-gesture-handler": "^2.24.0",
"react-native-safe-area-context": "^5.1.0",
"react-native-screens": "^4.9.1",
"react-native-gesture-handler": "^2.26.0",
"react-native-safe-area-context": "^5.4.0",
"react-native-screens": "^4.10.0",
"react-native-vector-icons": "^10.2.0",
"react-native-webview": "^13.13.1",
"react-native-webview": "^13.14.1",
"react-test-renderer": "19.0.0",
"release-it": "^17.10.0",
"turbo": "^1.10.7",
Expand Down
8 changes: 7 additions & 1 deletion src/__mocks__/MockRNIterableAPI.ts
Original file line number Diff line number Diff line change
Expand Up @@ -66,10 +66,16 @@ export class MockRNIterableAPI {
MockRNIterableAPI.attributionInfo = attributionInfo;
}

static initializeWithApiKey = jest.fn();
static initializeWithApiKey = jest.fn().mockResolvedValue(true);

static initialize2WithApiKey = jest.fn().mockResolvedValue(true);

static wakeApp = jest.fn()

static setInAppShowResponse = jest.fn();

static passAlongAuthToken = jest.fn();

static async getInAppMessages(): Promise<IterableInAppMessage[] | undefined> {
return await new Promise((resolve) => {
resolve(MockRNIterableAPI.messages);
Expand Down
Loading