Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Expand Unit Test Coverage #179

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

Merged
merged 5 commits into from
Apr 3, 2025
Merged

Expand Unit Test Coverage #179

merged 5 commits into from
Apr 3, 2025

Conversation

ncalteen
Copy link
Collaborator

@ncalteen ncalteen commented Apr 3, 2025

This pull request includes several updates and improvements across multiple files, focusing on adding new functionalities, updating dependencies, and enhancing test coverage. The most important changes include adding new mock implementations for testing.

No functionality changes have been introduced.

@ncalteen ncalteen self-assigned this Apr 3, 2025
@Copilot Copilot AI review requested due to automatic review settings April 3, 2025 17:38
Copy link

github-actions bot commented Apr 3, 2025

Semantic Version Check Passed βœ…

Version in manifest file package.json is valid.

This comment will be automatically updated as changes are pushed to this PR branch.

Copy link

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This pull request expands the unit test coverage, updates fixture imports to use scoped packages (e.g. @actions/core, @actions/github, @octokit/rest), and adds new tests for artifact operations (listing, getting, downloading, and deleting) as well as command execution.

  • Updates to module import paths using scoped packages
  • Addition of new tests to validate public and internal artifact functions
  • Inclusion of new tests for URL query parameter scrubbing and file system existence checks

Reviewed Changes

Copilot reviewed 60 out of 64 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
tests/stubs/artifact/internal/find/list-artifacts.test.ts Updated import paths and added tests for listing artifacts with filtering logic
tests/stubs/artifact/internal/find/get-artifact.test.ts Updated import paths and added tests for getting artifacts, including error handling and selection of the latest artifact
tests/stubs/artifact/internal/download/download-artifact.test.ts Added tests for URL scrubbing, fs.exists behavior, and error handling in artifact downloads
tests/stubs/artifact/internal/delete/delete-artifact.test.ts Updated import paths and added tests for deleting artifacts
tests/stubs/artifact/internal/client.test.ts Removed obsolete comments and updated core import path
tests/command.test.ts Added tests to validate command execution based on action.yaml configuration
fixtures/typescript/success-yaml/* Added action configuration and source files for a TypeScript action example
fixtures/fs.ts, fixtures/@octokit/rest.ts, fixtures/@actions/* Updated and added new fixture implementations to support the tests
README.md Updated dependency versions and documentation for the action packages
Files not reviewed (4)
  • fixtures/typescript/success-yaml/.env.fixture: Language not supported
  • fixtures/typescript/success-yaml/package-lock.json: Language not supported
  • fixtures/typescript/success-yaml/package.json: Language not supported
  • fixtures/typescript/success-yaml/tsconfig.json: Language not supported
Comments suppressed due to low confidence (1)

tests/command.test.ts:37

  • There is a typo in the test suite description. Consider renaming 'Commmand' to 'Command'.
describe('Commmand', () => {

Tip: Leave feedback on Copilot's review comments with the πŸ‘Ž and πŸ‘ buttons to help improve review quality. Learn more

Copy link

github-actions bot commented Apr 3, 2025

πŸ¦™ MegaLinter status: ❌ ERROR

Descriptor Linter Files Fixed Errors Warnings Elapsed time
βœ… ACTION actionlint 5 0 0 0.15s
βœ… JAVASCRIPT prettier 11 0 0 1.47s
βœ… JSON npm-package-json-lint yes no no 0.84s
βœ… JSON prettier 29 0 0 2.4s
βœ… MARKDOWN markdownlint 9 0 0 1.09s
βœ… REPOSITORY checkov yes no no 24.22s
βœ… REPOSITORY gitleaks yes no no 1.34s
βœ… REPOSITORY git_diff yes no no 0.02s
βœ… REPOSITORY grype yes no no 43.28s
βœ… REPOSITORY secretlint yes no no 1.16s
βœ… REPOSITORY syft yes no no 8.9s
❌ REPOSITORY trivy yes 1 no 14.55s
βœ… REPOSITORY trivy-sbom yes no no 1.27s
βœ… REPOSITORY trufflehog yes no no 29.53s
βœ… TYPESCRIPT prettier 82 0 0 3.65s
βœ… YAML prettier 24 0 0 0.82s
βœ… YAML yamllint 24 0 0 0.41s

See detailed report in MegaLinter reports

MegaLinter is graciously provided by OX Security

@ncalteen ncalteen merged commit 39845de into main Apr 3, 2025
13 of 14 checks passed
@ncalteen ncalteen deleted the ncalteen/review branch April 3, 2025 17:45
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.

1 participant