4
4
* Licensed under the BSD 3-Clause license.
5
5
* For full license text, see LICENSE.txt file in the repo root or https://opensource.org/licenses/BSD-3-Clause
6
6
*/
7
+
7
8
import { ConfigContents , SfdcUrl , SfError } from '@salesforce/core' ;
8
9
import { expect } from 'chai' ;
9
10
import { TestContext , uniqid } from '@salesforce/core/lib/testSetup' ;
@@ -38,10 +39,10 @@ describe('common unit tests', () => {
38
39
packageDirectories : [
39
40
{
40
41
path : 'force-app' ,
41
- default : true
42
- }
42
+ default : true ,
43
+ } ,
43
44
] ,
44
- sourceApiVersion : '50.0'
45
+ sourceApiVersion : '50.0' ,
45
46
} ) ;
46
47
const loginUrl = await Common . resolveLoginUrl ( undefined ) ;
47
48
expect ( loginUrl ) . to . equal ( SfdcUrl . PRODUCTION ) ;
@@ -51,11 +52,11 @@ describe('common unit tests', () => {
51
52
packageDirectories : [
52
53
{
53
54
path : 'force-app' ,
54
- default : true
55
- }
55
+ default : true ,
56
+ } ,
56
57
] ,
57
58
sfdcLoginUrl : 'https://login.salesforce.com' ,
58
- sourceApiVersion : '50.0'
59
+ sourceApiVersion : '50.0' ,
59
60
} ) ;
60
61
const loginUrl = await Common . resolveLoginUrl ( undefined ) ;
61
62
expect ( loginUrl ) . to . equal ( SfdcUrl . PRODUCTION ) ;
@@ -65,11 +66,11 @@ describe('common unit tests', () => {
65
66
packageDirectories : [
66
67
{
67
68
path : 'force-app' ,
68
- default : true
69
- }
69
+ default : true ,
70
+ } ,
70
71
] ,
71
72
sfdcLoginUrl : 'https://shanedevhub.lightning.force.com' ,
72
- sourceApiVersion : '50.0'
73
+ sourceApiVersion : '50.0' ,
73
74
} ) ;
74
75
try {
75
76
await Common . resolveLoginUrl ( undefined ) ;
@@ -105,25 +106,25 @@ describe('common unit tests', () => {
105
106
packageDirectories : [
106
107
{
107
108
path : 'force-app' ,
108
- default : true
109
- }
109
+ default : true ,
110
+ } ,
110
111
] ,
111
- sourceApiVersion : '50.0'
112
- }
112
+ sourceApiVersion : '50.0' ,
113
+ } ,
113
114
} ) ;
114
115
const loginUrl = await Common . resolveLoginUrl ( INSTANCE_URL_1 ) ;
115
116
expect ( loginUrl ) . to . equal ( INSTANCE_URL_1 ) ;
116
117
} ) ;
117
118
it ( 'should return custom login URL if project with property sfdcLoginUrl present and not equal to production URL' , async ( ) => {
118
119
await projectSetup ( $$ , true , {
119
- packageDirectories : [
120
- {
121
- path : 'force-app' ,
122
- default : true
123
- }
124
- ] ,
125
- sfdcLoginUrl : INSTANCE_URL_2 ,
126
- sourceApiVersion : '50.0'
120
+ packageDirectories : [
121
+ {
122
+ path : 'force-app' ,
123
+ default : true ,
124
+ } ,
125
+ ] ,
126
+ sfdcLoginUrl : INSTANCE_URL_2 ,
127
+ sourceApiVersion : '50.0' ,
127
128
} ) ;
128
129
const loginUrl = await Common . resolveLoginUrl ( undefined ) ;
129
130
expect ( loginUrl ) . to . equal ( INSTANCE_URL_2 ) ;
@@ -134,12 +135,12 @@ describe('common unit tests', () => {
134
135
packageDirectories : [
135
136
{
136
137
path : 'force-app' ,
137
- default : true
138
- }
138
+ default : true ,
139
+ } ,
139
140
] ,
140
141
sfdcLoginUrl : INSTANCE_URL_2 ,
141
- sourceApiVersion : '50.0'
142
- }
142
+ sourceApiVersion : '50.0' ,
143
+ } ,
143
144
} ) ;
144
145
const loginUrl = await Common . resolveLoginUrl ( INSTANCE_URL_1 ) ;
145
146
expect ( loginUrl ) . to . equal ( INSTANCE_URL_1 ) ;
0 commit comments