> jest --coverage
PASS src/getMSKAuthToken.spec.ts
generateAuthTokenFromCredentialsProvider
✓ should generate auth token with provided credentials (7 ms)
✓ should throw error when region is empty (7 ms)
✓ should throw error when credentials provider is null/undefined
✓ should throw error when accessKeyId is empty (1 ms)
✓ should throw error when secretAccessKey is empty
generateAuthToken
✓ should generate auth token with default credentials (2 ms)
✓ should throw error when region is empty (1 ms)
generateAuthTokenFromProfile
✓ should generate auth token with profile name input (1 ms)
✓ should throw error when profile name is empty (1 ms)
generateAuthTokenFromRole
✓ should generate auth token with role arn input (1 ms)
✓ should generate auth token with role arn and session name input (1 ms)
✓ should throw error when role arn is empty
--------------------------|---------|----------|---------|---------|-------------------
File | % Stmts | % Branch | % Funcs | % Lines | Uncovered Line #s
--------------------------|---------|----------|---------|---------|-------------------
All files | 100 | 100 | 100 | 100 |
constants.ts | 100 | 100 | 100 | 100 |
getMSKAuthToken.ts | 100 | 100 | 100 | 100 |
mskCredentialProvider.ts | 100 | 100 | 100 | 100 |
version.ts | 100 | 100 | 100 | 100 |
--------------------------|---------|----------|---------|---------|-------------------
Test Suites: 1 passed, 1 total
Tests: 12 passed, 12 total
Snapshots: 0 total
Time: 1.002 s
Ran all test suites.
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.
Description
Validate AWS credentials are not empty
Testing
npm ci && npm run build && npm run test
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.