Skip to content

chore(cdk-cli-wrapper): fix tests for monorepo#32511

Merged
mergify[bot] merged 1 commit intomainfrom
huijbers/fix-tests
Dec 13, 2024
Merged

chore(cdk-cli-wrapper): fix tests for monorepo#32511
mergify[bot] merged 1 commit intomainfrom
huijbers/fix-tests

Conversation

@rix0rrr
Copy link
Copy Markdown
Contributor

@rix0rrr rix0rrr commented Dec 13, 2024

In a slightly different testing setup, the jest.spyOn calls fail with the error:

Cannot redefine property: spawnSync

This has to do with how the object representing the fs module is defined. We can override the module and return a plain object with all the functions, so that the elements can be mocked later on.


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

In a slightly different testing setup, the `jest.spyOn` calls fail
with the error:

```
Cannot redefine property: spawnSync
```

This has to do with how the object representing the `fs` module
is defined. We can override the module and return a plain
object with all the functions, so that the elements can be mocked
later on.
@rix0rrr rix0rrr requested a review from a team December 13, 2024 10:59
@github-actions github-actions bot added the p2 label Dec 13, 2024
@aws-cdk-automation aws-cdk-automation requested a review from a team December 13, 2024 10:59
@mergify mergify bot added the contribution/core This is a PR that came from AWS. label Dec 13, 2024
@codecov
Copy link
Copy Markdown

codecov bot commented Dec 13, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 78.66%. Comparing base (62a0638) to head (cea4767).
Report is 1 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main   #32511   +/-   ##
=======================================
  Coverage   78.66%   78.66%           
=======================================
  Files         107      107           
  Lines        7161     7161           
  Branches     1320     1320           
=======================================
  Hits         5633     5633           
  Misses       1343     1343           
  Partials      185      185           
Flag Coverage Δ
suite.unit 78.66% <ø> (ø)

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

Components Coverage Δ
packages/aws-cdk 78.66% <ø> (ø)

@aws-cdk-automation
Copy link
Copy Markdown
Collaborator

AWS CodeBuild CI Report

  • CodeBuild project: AutoBuildv2Project1C6BFA3F-wQm2hXv2jqQv
  • Commit ID: cea4767
  • Result: SUCCEEDED
  • Build Logs (available for 30 days)

Powered by github-codebuild-logs, available on the AWS Serverless Application Repository

@mergify
Copy link
Copy Markdown
Contributor

mergify bot commented Dec 13, 2024

Thank you for contributing! Your pull request will be updated from main and then merged automatically (do not update manually, and be sure to allow changes to be pushed to your fork).

@mergify mergify bot merged commit ad1699a into main Dec 13, 2024
@mergify mergify bot deleted the huijbers/fix-tests branch December 13, 2024 11:30
@github-actions
Copy link
Copy Markdown
Contributor

Comments on closed issues and PRs are hard for our team to see.
If you need help, please open a new issue that references this one.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Dec 13, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

contribution/core This is a PR that came from AWS. p2

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants