-
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.
tests(pipes): add test for targetParameters
- Loading branch information
1 parent
3ad2cdc
commit a4b630a
Showing
2 changed files
with
18 additions
and
7 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
14 changes: 14 additions & 0 deletions
14
packages/@aws-cdk/aws-pipes-alpha/test/targetParameters.test.ts
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,14 @@ | ||
import { TargetParameter } from '../lib'; | ||
|
||
describe('TargetParameter', ()=>{ | ||
describe('fromJsonPath', ()=>{ | ||
it('should return a string in correct format', ()=>{ | ||
expect(TargetParameter.fromJsonPath('$.test')).toEqual('<$.test>'); | ||
}); | ||
it('should throw an error if the jsonPath does not start with "$."', ()=>{ | ||
expect(()=>TargetParameter.fromJsonPath('test')).toThrow('JsonPath must start with "$."'); | ||
}); | ||
}, | ||
); | ||
}, | ||
); |