@@ -7,10 +7,9 @@ import * as assert from 'assert'
7
7
import { CloudFormation , Lambda } from 'aws-sdk'
8
8
import * as os from 'os'
9
9
import {
10
- CloudFormationStackNode ,
11
- DefaultCloudFormationFunctionNode ,
12
- DefaultCloudFormationNode ,
13
- DefaultCloudFormationStackNode
10
+ CloudFormationFunctionNode ,
11
+ CloudFormationNode ,
12
+ CloudFormationStackNode
14
13
} from '../../../lambda/explorer/cloudFormationNodes'
15
14
import { CloudFormationClient } from '../../../shared/clients/cloudFormationClient'
16
15
import { EcsClient } from '../../../shared/clients/ecsClient'
@@ -27,7 +26,7 @@ async function* asyncGenerator<T>(items: T[]): AsyncIterableIterator<T> {
27
26
yield * items
28
27
}
29
28
30
- describe ( 'DefaultCloudFormationStackNode ' , ( ) => {
29
+ describe ( 'CloudFormationStackNode ' , ( ) => {
31
30
let fakeStackSummary : CloudFormation . StackSummary
32
31
33
32
before ( async ( ) => {
@@ -192,21 +191,21 @@ describe('DefaultCloudFormationStackNode', () => {
192
191
assert ( childNodes !== undefined )
193
192
assert . strictEqual ( childNodes . length , 2 )
194
193
195
- assert ( childNodes [ 0 ] instanceof DefaultCloudFormationFunctionNode )
196
- assert . strictEqual ( ( childNodes [ 0 ] as DefaultCloudFormationFunctionNode ) . label , lambda1Name )
194
+ assert ( childNodes [ 0 ] instanceof CloudFormationFunctionNode )
195
+ assert . strictEqual ( ( childNodes [ 0 ] as CloudFormationFunctionNode ) . label , lambda1Name )
197
196
198
- assert ( childNodes [ 1 ] instanceof DefaultCloudFormationFunctionNode )
199
- assert . strictEqual ( ( childNodes [ 1 ] as DefaultCloudFormationFunctionNode ) . label , lambda3Name )
197
+ assert ( childNodes [ 1 ] instanceof CloudFormationFunctionNode )
198
+ assert . strictEqual ( ( childNodes [ 1 ] as CloudFormationFunctionNode ) . label , lambda3Name )
200
199
} )
201
200
202
201
function generateTestNode ( ) : CloudFormationStackNode {
203
202
const parentNode = new TestAWSTreeNode ( 'test node' )
204
203
205
- return new DefaultCloudFormationStackNode ( parentNode , 'someregioncode' , fakeStackSummary )
204
+ return new CloudFormationStackNode ( parentNode , 'someregioncode' , fakeStackSummary )
206
205
}
207
206
} )
208
207
209
- describe ( 'DefaultCloudFormationNode ' , ( ) => {
208
+ describe ( 'CloudFormationNode ' , ( ) => {
210
209
class StackNamesMockCloudFormationClient extends MockCloudFormationClient {
211
210
public constructor (
212
211
public readonly stackNames : string [ ] = [ ] ,
@@ -251,7 +250,7 @@ describe('DefaultCloudFormationNode', () => {
251
250
}
252
251
}
253
252
254
- const cloudFormationNode = new DefaultCloudFormationNode ( 'someregioncode' )
253
+ const cloudFormationNode = new CloudFormationNode ( 'someregioncode' )
255
254
256
255
const children = await cloudFormationNode . getChildren ( )
257
256
@@ -267,12 +266,12 @@ describe('DefaultCloudFormationNode', () => {
267
266
expectedNodeText : string
268
267
) {
269
268
assert . strictEqual (
270
- actualChildNode instanceof DefaultCloudFormationStackNode ,
269
+ actualChildNode instanceof CloudFormationStackNode ,
271
270
true ,
272
271
'Child node was not a Stack Node'
273
272
)
274
273
275
- const node : DefaultCloudFormationStackNode = actualChildNode as DefaultCloudFormationStackNode
274
+ const node = actualChildNode as CloudFormationStackNode
276
275
assert . strictEqual (
277
276
node . stackName ,
278
277
expectedNodeText ,
@@ -287,7 +286,7 @@ describe('DefaultCloudFormationNode', () => {
287
286
} )
288
287
289
288
it ( 'handles error' , async ( ) => {
290
- class ThrowErrorDefaultCloudFormationNode extends DefaultCloudFormationNode {
289
+ class ThrowErrorCloudFormationNode extends CloudFormationNode {
291
290
public constructor ( ) {
292
291
super ( 'someregioncode' )
293
292
}
@@ -297,7 +296,7 @@ describe('DefaultCloudFormationNode', () => {
297
296
}
298
297
}
299
298
300
- const testNode : ThrowErrorDefaultCloudFormationNode = new ThrowErrorDefaultCloudFormationNode ( )
299
+ const testNode : ThrowErrorCloudFormationNode = new ThrowErrorCloudFormationNode ( )
301
300
302
301
const childNodes = await testNode . getChildren ( )
303
302
assert ( childNodes !== undefined )
0 commit comments