Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tests - Environment Targets #69

Open
wants to merge 28 commits into
base: main
Choose a base branch
from

Conversation

AdrianRomanski
Copy link
Member

No description provided.

@AdrianRomanski AdrianRomanski marked this pull request as ready for review January 8, 2025 07:46
@AdrianRomanski
Copy link
Member Author

I have paid attention to everything mentioned in the cache PR:

Avoid unnecessary describe block nesting.
Use spies and mocks consistently.
Improve test naming for better clarity.
Make mocks as minimal as possible and keep them in the same file.
Perform a self-review.
As an extra, I’ve also written some missing documentation this time. :)

const ENVIRONMENTS_DIRECTORY = '/environments';
const TARGET_NAMES = ['e2e'];
const TAGS = ['env:production'];
const TARGETS: { [targetName: string]: TargetConfiguration } = {
Copy link
Contributor

Choose a reason for hiding this comment

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

If the cons is only used here in the definition block to define another const we can inline the value.
In this case we could inline TARGETS directly into PROJECT_CONFIG

Copy link
Member Author

@AdrianRomanski AdrianRomanski Jan 17, 2025

Choose a reason for hiding this comment

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

I have deleted every const that was used once #69 (comment), but TARGETS are used 7 times (in the methods), so i decided to keep them

Copy link
Contributor

@BioPhoton BioPhoton left a comment

Choose a reason for hiding this comment

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

Thanks a lot for your PR and increasing test code coverage. I left some comments to improve the naming and structure.

@AdrianRomanski
Copy link
Member Author

AdrianRomanski commented Jan 18, 2025

Things done after review

  1. Inline every const that were used once
  2. Group tests by happy/unhappy path
  3. Better test phrasing (mostly generating part)
  4. Self review (catch one grouping that was left)

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.

2 participants