Skip to content

Conversation

@mrgrain
Copy link
Contributor

@mrgrain mrgrain commented May 1, 2025

These were previously ignored, presumingly because they did not follow most of our linting rules. However now a lot less tests are in the CLI package (most moved to toolkit-lib) so we can safely re-enable linting of test files.

Added '@typescript-eslint/unbound-method': 'off' for test files, since there were many violations of this and it doesn't seem necessary to enforce this rule in test code.

Most test code changes are automated. I've annotated the few manual fixes I made.


By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license

@mrgrain mrgrain temporarily deployed to integ-approval May 1, 2025 15:26 — with GitHub Actions Inactive
@github-actions github-actions bot added the p2 label May 1, 2025
Comment on lines +1005 to +1006
'aws-sdk-client-mock',
'aws-sdk-client-mock-jest',
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These were missing dev deps that eslint discovered.

@aws-cdk-automation aws-cdk-automation requested a review from a team May 1, 2025 15:27

test('require approval by default - respond no', async () => {
expect(() => requestResponse('n', plainMessage({
await expect(() => requestResponse('n', plainMessage({
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this was missing before, all promises must be awaited

deployments: new FakeCloudFormation({}),
});
stderrMock.mockImplementation((...x) => {
// eslint-disable-next-line no-console
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

allow in this case

@codecov-commenter
Copy link

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 79.15%. Comparing base (302f9bc) to head (5ddfa8b).

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #441   +/-   ##
=======================================
  Coverage   79.15%   79.15%           
=======================================
  Files          54       54           
  Lines        6889     6889           
  Branches      773      772    -1     
=======================================
  Hits         5453     5453           
  Misses       1418     1418           
  Partials       18       18           
Flag Coverage Δ
suite.unit 79.15% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@aws-cdk-automation aws-cdk-automation added this pull request to the merge queue May 1, 2025
Merged via the queue into main with commit e1a9030 May 1, 2025
35 checks passed
@aws-cdk-automation aws-cdk-automation deleted the mrgrain/chore/lint-cli-test-files branch May 1, 2025 16:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants