-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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
Fix usage of nested objects in environments #2249
Conversation
Deploy preview for insomnia-storybook ready! Built with commit 4ca9b98 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, nice catch on the PREFIX vs SEPARATOR
environment: { | ||
foo: 'parent', | ||
ancestor: true, | ||
}, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I wonder if this change is triggered by your IDE and not controlled by ESLint/prettier rules? It shouldn't happen now that there is one source of truth for linting everywhere.
const rendered = await renderUtils.render('Hello {{ users[0].name }}!', { | ||
users: [{ name: 'Niji' }], | ||
}); | ||
expect(rendered).toBe('Hello Niji!'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yay tests 🤗
name: 'Grandparent', | ||
type: models.requestGroup.type, | ||
environment: { | ||
users: [{ name: 'Mike' }, { name: 'Opender' }], |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We're not that old 😉
@@ -44,7 +44,7 @@ export async function buildRenderContext( | |||
const ordered = orderedJSON.order( | |||
rootEnvironment.data, | |||
rootEnvironment.dataPropertyOrder, | |||
JSON_ORDER_PREFIX, | |||
JSON_ORDER_SEPARATOR, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ooft, nice catch 👍
This PR fixes an issue where object properties within arrays disappear.