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

TSify test/Core #7428

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

TSify test/Core #7428

wants to merge 1 commit into from

Conversation

pjonsson
Copy link
Contributor

@pjonsson pjonsson commented Dec 29, 2024

What this PR does

TSify test/Core.

Test me

Review the CorsProxy change, and see that the CI passes.

Checklist

  • There are unit tests to verify my changes are correct or unit tests aren't applicable (if so, write quick reason why unit tests don't exist)
  • I've updated relevant documentation in doc/.
  • I've updated CHANGES.md with what I changed.
  • I've provided instructions in the PR description on how to test this PR.

@@ -21,7 +21,7 @@ export default class CorsProxy {
* Domains that should be proxied for, as set by config files. Stored as an array of hosts - if a TLD is specified,
* subdomains will also be proxied.
*/
proxyDomains: string[] | undefined = undefined;
proxyDomains: string[] = [];
Copy link
Contributor Author

Choose a reason for hiding this comment

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

CorsProxySpec could be used almost without modifications by initializing proxyDomains to the empty array instead of undefined.

Allowing proxyDomains to be undefined means we have to insert a bunch of if (isDefined(corsProxy.proxyDomain)) { } around the content of the tests.

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