@@ -48,30 +48,30 @@ describe('addRegionCommand', function () {
4848
4949 cluster . DBClusterMembers = [ { IsClusterWriter : true } ]
5050 const parentNode = new DocumentDBNode ( docdb )
51+
5152 node = new DBClusterNode ( parentNode , cluster , docdb )
5253 } )
53-
5454 afterEach ( function ( ) {
5555 sandbox . restore ( )
5656 getTestWindow ( ) . dispose ( )
5757 } )
58-
5958 function setupWizard ( ) {
6059 getTestWindow ( ) . onDidShowInputBox ( ( input ) => {
61- let value : string
60+ let val : string
61+
6262 if ( input . prompt ?. includes ( 'global' ) ) {
63- value = globalClusterName
63+ val = globalClusterName
6464 } else if ( input . prompt ?. includes ( 'cluster name' ) ) {
65- value = clusterName
65+ val = clusterName
6666 } else {
67- value = ''
67+ val = ''
6868 }
69- input . acceptValue ( value )
69+ input . acceptValue ( val )
7070 } )
7171
72- getTestWindow ( ) . onDidShowQuickPick ( async ( picker ) => {
73- await picker . untilReady ( )
74- picker . acceptItem ( picker . items [ 0 ] )
72+ getTestWindow ( ) . onDidShowQuickPick ( async ( testQuickPicker ) => {
73+ await testQuickPicker . untilReady ( )
74+ testQuickPicker . acceptItem ( testQuickPicker . items [ 0 ] )
7575 } )
7676 }
7777
@@ -83,10 +83,11 @@ describe('addRegionCommand', function () {
8383 const createClusterStub = sinon . stub ( ) . resolves ( {
8484 DBClusterIdentifier : clusterName ,
8585 } )
86- const createInstanceStub = sinon . stub ( ) . resolves ( )
86+ const createInstanceSinonStub = sinon . stub ( ) . resolves ( )
8787 docdb . createGlobalCluster = createGlobalClusterStub
8888 docdb . createCluster = createClusterStub
89- docdb . createInstance = createInstanceStub
89+ docdb . createInstance = createInstanceSinonStub
90+
9091 setupWizard ( )
9192
9293 // act
@@ -110,9 +111,8 @@ describe('addRegionCommand', function () {
110111 } )
111112 )
112113 )
113-
114114 assert (
115- createInstanceStub . calledOnceWith (
115+ createInstanceSinonStub . calledOnceWith (
116116 sinon . match ( {
117117 Engine : 'docdb' ,
118118 DBClusterIdentifier : clusterName ,
@@ -132,13 +132,13 @@ describe('addRegionCommand', function () {
132132 const createGlobalClusterStub = sinon . stub ( ) . resolves ( {
133133 GlobalClusterIdentifier : globalClusterName ,
134134 } )
135- const createClusterStub = sinon . stub ( ) . resolves ( {
135+ const createClusterSinonStub = sinon . stub ( ) . resolves ( {
136136 DBClusterIdentifier : clusterName ,
137137 } )
138- const createInstanceStub = sinon . stub ( ) . resolves ( )
138+ const createInstanceSinonStub = sinon . stub ( ) . resolves ( )
139139 docdb . createGlobalCluster = createGlobalClusterStub
140- docdb . createCluster = createClusterStub
141- docdb . createInstance = createInstanceStub
140+ docdb . createCluster = createClusterSinonStub
141+ docdb . createInstance = createInstanceSinonStub
142142 setupWizard ( )
143143
144144 const globalCluster : GlobalCluster = {
@@ -157,7 +157,7 @@ describe('addRegionCommand', function () {
157157 assert ( createGlobalClusterStub . notCalled )
158158
159159 assert (
160- createClusterStub . calledOnceWith (
160+ createClusterSinonStub . calledOnceWith (
161161 sinon . match ( {
162162 DBClusterIdentifier : clusterName ,
163163 GlobalClusterIdentifier : globalClusterName ,
@@ -166,7 +166,7 @@ describe('addRegionCommand', function () {
166166 )
167167
168168 assert (
169- createInstanceStub . calledOnceWith (
169+ createInstanceSinonStub . calledOnceWith (
170170 sinon . match ( {
171171 Engine : 'docdb' ,
172172 DBClusterIdentifier : clusterName ,
@@ -175,7 +175,6 @@ describe('addRegionCommand', function () {
175175 } )
176176 )
177177 )
178-
179178 sandbox . assert . calledWith ( spyExecuteCommand , 'aws.refreshAwsExplorerNode' , node )
180179
181180 assertTelemetry ( 'docdb_addRegion' , { result : 'Succeeded' } )
0 commit comments