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

Small adjustments to #1823 #1825

Merged
merged 2 commits into from
Jun 26, 2020

Conversation

absoludity
Copy link
Contributor

Just a couple of small changes I wanted to check from #1823.

@@ -13,7 +13,7 @@ describe("Config", () => {

defaultJSON = require("../../public/config.json");

moxios.stubRequest("config.json", { status: 200, response: defaultJSON });
moxios.stubRequest("config.json", { status: 200, response: { ...defaultJSON } });
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This was the reason it was passing either way - the actual defaultJSON data was being updated by the code, rather than a copy of the data. Perhaps the require only happens once - I'm not sure, but the test now fails if you comment out line 36 below (where as it didn't when you removed it due to TS complaining about a read-only value).

Copy link
Contributor

@andresmgot andresmgot left a comment

Choose a reason for hiding this comment

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

Thanks

@andresmgot andresmgot merged commit f49b3ef into vmware-tanzu:master Jun 26, 2020
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.

None yet

2 participants