-
Notifications
You must be signed in to change notification settings - Fork 4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(aws-codepipeline): New Pipeline#addStage convenience method. (#647)
Added to make creating Stage objects a little more concise.
- Loading branch information
Showing
4 changed files
with
42 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
import { expect, haveResource } from '@aws-cdk/assert'; | ||
import cdk = require('@aws-cdk/cdk'); | ||
import { Test } from 'nodeunit'; | ||
import codepipeline = require('../lib'); | ||
|
||
// tslint:disable:object-literal-key-quotes | ||
|
||
export = { | ||
'Pipeline Stages': { | ||
'can also be created by using the Pipeline#addStage method'(test: Test) { | ||
const stack = new cdk.Stack(); | ||
const pipeline = new codepipeline.Pipeline(stack, 'Pipeline'); | ||
pipeline.addStage('Stage'); | ||
|
||
expect(stack, true).to(haveResource('AWS::CodePipeline::Pipeline', { | ||
"Stages": [ | ||
{ "Name": "Stage" }, | ||
], | ||
})); | ||
|
||
test.done(); | ||
}, | ||
}, | ||
}; |