forked from aws/aws-cdk
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore(ecr): migrate tests to jest (aws#12620)
* use native jest API like what aws#12596 did * move `removal policy is "Retain" by default` & `'grant adds appropriate resource-*'` tests out of `events` scope in `repository.test.ts`, which I believe they were misplaced I'm doing this partially because I would like to implement the feature proposed in aws#12618. It would be easier to mock `aws-sdk` function calls with jest. ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
- Loading branch information
Showing
6 changed files
with
113 additions
and
150 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -14,5 +14,6 @@ nyc.config.js | |
.LAST_PACKAGE | ||
*.snk | ||
!.eslintrc.js | ||
!jest.config.js | ||
|
||
junit.xml | ||
junit.xml |
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 |
---|---|---|
|
@@ -19,8 +19,9 @@ dist | |
|
||
tsconfig.json | ||
.eslintrc.js | ||
jest.config.js | ||
|
||
# exclude cdk artifacts | ||
**/cdk.out | ||
junit.xml | ||
test/ | ||
test/ |
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,10 @@ | ||
const baseConfig = require('cdk-build-tools/config/jest.config'); | ||
module.exports = { | ||
...baseConfig, | ||
coverageThreshold: { | ||
global: { | ||
...baseConfig.coverageThreshold.global, | ||
branches: 70, | ||
}, | ||
}, | ||
}; |
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
Oops, something went wrong.