Skip to content

TA-3768: Setup test config#205

Merged
Jeta (jetakasabaqi) merged 54 commits into
content-cli-v2-refactoringfrom
TA-3768-setup-test-config
May 26, 2025
Merged

TA-3768: Setup test config#205
Jeta (jetakasabaqi) merged 54 commits into
content-cli-v2-refactoringfrom
TA-3768-setup-test-config

Conversation

@ZgjimHaziri
Copy link
Copy Markdown
Contributor

@ZgjimHaziri Zgjim Haziri (ZgjimHaziri) commented May 22, 2025

Description

Setup of tests in Content CLI, fully based on the previous setup. The changes from it:

  • The Context used to be static, so it was directly mocked. Now it is initialized at the call of a command, so we provided a testContext which provides a base context that can be used in tests.
  • Since we now have more debug-level logs, the LoggingTestTransport (renamed from TestTransport) that handles logging in tests was changed to filter out these debug logs. This is done because there are tests which do assertions on logs.
  • The yarn test step in build-pr workflow will stay commented until actual tests are added with future PRs. The command is failing when there are no tests.

Other:

  • Saw that we were doing different imports of the fs command, so I made them consistent to only get it from the fs

Checklist

  • I have self-reviewed this PR
  • I have tested the change and proved that it works in different scenarios
  • I have updated docs if needed

Base automatically changed from TA-3770-migrate-cpm4-commands to content-cli-v2-refactoring May 22, 2025 14:15
@ZgjimHaziri Zgjim Haziri (ZgjimHaziri) requested a review from a team May 22, 2025 14:15
@jetakasabaqi Jeta (jetakasabaqi) dismissed stale reviews from Buqeta (Buqeta) and themself via acebee5 May 23, 2025 11:29
@jetakasabaqi Jeta (jetakasabaqi) merged commit 9ad11a3 into content-cli-v2-refactoring May 26, 2025
1 check passed
@jetakasabaqi Jeta (jetakasabaqi) deleted the TA-3768-setup-test-config branch May 26, 2025 07:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants