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

[Ops] Work around unit-tests in watch mode fails to set 'structuredClone' #174444

Merged
merged 1 commit into from
Jan 8, 2024

Conversation

delanni
Copy link
Contributor

@delanni delanni commented Jan 8, 2024

Summary

@CoenWarmer found that --watch on jest tests will cause this sort of error:

    TypeError: Cannot assign to read only property 'structuredClone' of object '[object global]'

There's some workaround suggested on this thread (although not necessarily related): zloirock/core-js#1281

In the workaround, we set structuredClone to {}, this would allow the currently offending 3rd party to overwrite it where it's currently getting an error.

@delanni
Copy link
Contributor Author

delanni commented Jan 8, 2024

/ci

@kibana-ci
Copy link
Collaborator

💚 Build Succeeded

Metrics [docs]

✅ unchanged

To update your PR or re-run it, just comment with:
@elasticmachine merge upstream

@delanni delanni added Team:Operations Team label for Operations Team release_note:skip Skip the PR/issue when compiling release notes backport:skip This commit does not require backporting labels Jan 8, 2024
@delanni delanni marked this pull request as ready for review January 8, 2024 13:17
@delanni delanni requested review from a team as code owners January 8, 2024 13:17
@elasticmachine
Copy link
Contributor

Pinging @elastic/kibana-operations (Team:Operations)

@delanni delanni merged commit a5dbf26 into elastic:main Jan 8, 2024
26 checks passed
delanni added a commit to delanni/kibana that referenced this pull request Jan 11, 2024
…one' (elastic#174444)

## Summary
@CoenWarmer found that `--watch` on jest tests will cause this sort of
error:
```
    TypeError: Cannot assign to read only property 'structuredClone' of object '[object global]'
```

There's some workaround suggested on this thread (although not
necessarily related): zloirock/core-js#1281

In the workaround, we set `structuredClone` to `{}`, this would allow
the currently offending 3rd party to overwrite it where it's currently
getting an error.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport:skip This commit does not require backporting release_note:skip Skip the PR/issue when compiling release notes Team:Operations Team label for Operations Team v8.13.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants