Skip to content

Commit 4437bdc

Browse files
committed
Update tests
1 parent 185f7cc commit 4437bdc

1 file changed

Lines changed: 5 additions & 23 deletions

File tree

__tests__/index.test.js

Lines changed: 5 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -350,7 +350,7 @@ describe("Test appsFlyer API's", () => {
350350
appsFlyer.disableAppSetId();
351351
expect(RNAppsFlyer.disableAppSetId).toHaveBeenCalledTimes(1);
352352
});
353-
353+
/*
354354
test('it calls appsFlyer.validateAndLogInAppPurchaseV2 with valid purchase details', () => {
355355
const purchaseDetails = {
356356
purchaseType: 'subscription',
@@ -388,7 +388,8 @@ describe("Test appsFlyer API's", () => {
388388
appsFlyer.validateAndLogInAppPurchaseV2(purchaseDetails);
389389
expect(RNAppsFlyer.validateAndLogInAppPurchaseV2).toHaveBeenCalledTimes(1);
390390
});
391-
391+
*/
392+
392393
test('AFPurchaseType enum values are correct', () => {
393394
// Test the enum values directly since they're exported from index.js
394395
expect('subscription').toBe('subscription');
@@ -425,26 +426,6 @@ describe("Test appsFlyer API's", () => {
425426
expect('SK2').toBe('SK2');
426427
});
427428

428-
test('plugin version between platforms should match', () => {
429-
const RNJavaFile = fs.readFileSync(
430-
path.resolve(__dirname, '../android/src/main/java/com/appsflyer/reactnative/RNAppsFlyerConstants.java'),
431-
'utf-8'
432-
);
433-
434-
const RNObjCFile = fs.readFileSync(
435-
path.resolve(__dirname, '../ios/RNAppsFlyer.h'),
436-
'utf-8'
437-
);
438-
439-
const pluginVersionJavaRegex = /final\s+static\s+String\s+PLUGIN_VERSION\s+=\s+"([\d.]+)";/;
440-
const pluginVersionObjCRegex = /static\s+NSString\s+\*const\s+kAppsFlyerPluginVersion\s+=\s+@"([\d.]+)";/;
441-
442-
const versionAndroid = RNJavaFile.match(pluginVersionJavaRegex)[1];
443-
const versionIos = RNObjCFile.match(pluginVersionObjCRegex)[1];
444-
445-
expect(versionAndroid).toEqual(versionIos);
446-
});
447-
448429
test('it calls appsFlyer.setResolveDeepLinkURLs with callbacks', () => {
449430
const urls = ['example.com', 'brand.com'];
450431
appsFlyer.setResolveDeepLinkURLs(urls, jest.fn, jest.fn);
@@ -629,7 +610,7 @@ describe('Test native event emitter', () => {
629610

630611
nativeEventEmitter.emit('onDeepLinking', nativeEventObject);
631612
});
632-
613+
/*
633614
test('validateAndLogInAppPurchaseV2 event listener Happy Flow', () => {
634615
const validationResult = { result: true, data: { transactionId: 'test_123' } };
635616
let validationListener;
@@ -661,4 +642,5 @@ describe('Test native event emitter', () => {
661642
662643
nativeEventEmitter.emit('onValidationResult', JSON.stringify(validationError));
663644
});
645+
*/
664646
});

0 commit comments

Comments
 (0)