Skip to content

Commit 250c29b

Browse files
committed
Use constants for test values
1 parent bdd5a44 commit 250c29b

File tree

1 file changed

+16
-12
lines changed

1 file changed

+16
-12
lines changed

packages/auth/src/core/strategies/action_code_settings.test.ts

Lines changed: 16 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,10 @@ describe('core/strategies/action_code_settings', () => {
2626
let auth: TestAuth;
2727
const request: GetOobCodeRequest = {};
2828

29+
const TEST_BUNDLE_ID = 'my-bundle';
30+
const TEST_FDL_DOMAIN = 'fdl-domain';
31+
const TEST_URL = 'my-url';
32+
2933
beforeEach(async () => {
3034
auth = await testAuth();
3135
});
@@ -35,10 +39,10 @@ describe('core/strategies/action_code_settings', () => {
3539
_setActionCodeSettingsOnRequest(auth, request, {
3640
handleCodeInApp: true,
3741
iOS: {
38-
bundleId: 'my-bundle'
42+
bundleId: TEST_BUNDLE_ID
3943
},
4044
url: '',
41-
dynamicLinkDomain: 'fdl-domain'
45+
dynamicLinkDomain: TEST_FDL_DOMAIN
4246
})
4347
).to.throw(FirebaseError, '(auth/invalid-continue-uri)');
4448
});
@@ -48,9 +52,9 @@ describe('core/strategies/action_code_settings', () => {
4852
_setActionCodeSettingsOnRequest(auth, request, {
4953
handleCodeInApp: true,
5054
iOS: {
51-
bundleId: 'my-bundle'
55+
bundleId: TEST_BUNDLE_ID
5256
},
53-
url: 'my-url'
57+
url: TEST_URL
5458
})
5559
).to.not.throw();
5660
});
@@ -60,9 +64,9 @@ describe('core/strategies/action_code_settings', () => {
6064
_setActionCodeSettingsOnRequest(auth, request, {
6165
handleCodeInApp: true,
6266
iOS: {
63-
bundleId: 'my-bundle'
67+
bundleId: TEST_BUNDLE_ID
6468
},
65-
url: 'my-url',
69+
url: TEST_URL,
6670
dynamicLinkDomain: ''
6771
})
6872
).to.throw(FirebaseError, '(auth/invalid-dynamic-link-domain)');
@@ -73,9 +77,9 @@ describe('core/strategies/action_code_settings', () => {
7377
_setActionCodeSettingsOnRequest(auth, request, {
7478
handleCodeInApp: true,
7579
iOS: {
76-
bundleId: 'my-bundle'
80+
bundleId: TEST_BUNDLE_ID
7781
},
78-
url: 'my-url',
82+
url: TEST_URL,
7983
linkDomain: ''
8084
})
8185
).to.throw(FirebaseError, '(auth/invalid-hosting-link-domain)');
@@ -88,8 +92,8 @@ describe('core/strategies/action_code_settings', () => {
8892
iOS: {
8993
bundleId: ''
9094
},
91-
url: 'my-url',
92-
dynamicLinkDomain: 'fdl-domain'
95+
url: TEST_URL,
96+
dynamicLinkDomain: TEST_FDL_DOMAIN
9397
})
9498
).to.throw(FirebaseError, '(auth/missing-ios-bundle-id)');
9599
});
@@ -101,8 +105,8 @@ describe('core/strategies/action_code_settings', () => {
101105
android: {
102106
packageName: ''
103107
},
104-
url: 'my-url',
105-
dynamicLinkDomain: 'fdl-domain'
108+
url: TEST_URL,
109+
dynamicLinkDomain: TEST_FDL_DOMAIN
106110
})
107111
).to.throw(FirebaseError, '(auth/missing-android-pkg-name)');
108112
});

0 commit comments

Comments
 (0)