-
Notifications
You must be signed in to change notification settings - Fork 9.4k
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
tests(smoke): deep clone expectations. do not use p.stdout #10361
Conversation
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.
This seems harmless enough, but I want someone with more JS experience than me to say this pattern is makes sense.
@patrickhulce I choose you! |
/** | ||
* @param {Smokehouse.SmokehouseLibOptions} options | ||
*/ | ||
async function smokehouse(options) { | ||
const {urlFilterRegex, skip, modify, ...smokehouseOptions} = options; | ||
|
||
/** @type {Smokehouse.TestDfn[]} */ | ||
const clonedTests = JSON.parse(JSON.stringify(smokeTests)); | ||
const clonedTests = deepCopy(smokeTests); |
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.
this is just dev dependency why not use just use _.cloneDeep
? :) https://lodash.com/docs/4.17.15#cloneDeep
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.
if we decide to keep and maintain this ourselves instead I expect rigorous tests and edge cases ;)
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.
sgtm
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
@paulirish what up with pr lint |
Found two issues when trying to consume this internally.