-
Notifications
You must be signed in to change notification settings - Fork 335
Remove the fixtures directory #854
Remove the fixtures directory #854
Conversation
…te-to-shareholder-value
…te-to-shareholder-value
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 a great step in the right direction, love it.
…te-to-shareholder-value
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.
love it
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.
Small change request--can we call cleanup() at the end of every test as well?
type = "webpack" | ||
"#}; | ||
"#, | ||
); |
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.
do we also want to call "cleanup" at the end of every one of these tests? I feel like that would be advisable.
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.
he added it to the preview
helper function: https://github.com/cloudflare/wrangler/pull/854/files#diff-eb986e3abcfb440d6233373e1d67f78dR190
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.
gotcha! I would prefer for cleanup to explicitly happen as its own call instead of being put in preview(), given that preview() should not have cleanup as a side effect. OR change preview() to preview_and_cleanup().
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.
fwiw, as part of my test refactor work i will likely update fixtures to conditionally clean up based on whether tests pass, per the test fixture library used by wasm_pack.
Hmm, how about a function name that describes file creation, preview, and
deletion then? Lumping all three of those under preview is still too many
side effects for an otherwise very simply named function
…On Fri, Nov 8, 2019 at 3:50 PM Avery Harnish ***@***.***> wrote:
***@***.**** commented on this pull request.
------------------------------
In tests/preview.rs
<#854 (comment)>:
> type = "webpack"
- "#};
+ "#,
+ );
Doesn't make sense for me to call cleanup separately I think - preview
will both create the files and clean them up. We don't actually create the
files until we enter the preview function even though we call
fixture.createFile that's just a string in memory
—
You are receiving this because your review was requested.
Reply to this email directly, view it on GitHub
<#854>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AB4YZSPJRQ46XZL4I7EYFSDQSXGI7ANCNFSM4JJ7JCHA>
.
|
(Just being nit picky from a maintainability standpoint! I shouldn’t have
to dig for where features live if function names can help make that evident
:)
…On Fri, Nov 8, 2019 at 3:51 PM Gabbi Fisher ***@***.***> wrote:
Hmm, how about a function name that describes file creation, preview, and
deletion then? Lumping all three of those under preview is still too many
side effects for an otherwise very simply named function
On Fri, Nov 8, 2019 at 3:50 PM Avery Harnish ***@***.***>
wrote:
> ***@***.**** commented on this pull request.
> ------------------------------
>
> In tests/preview.rs
> <#854 (comment)>:
>
> > type = "webpack"
> - "#};
> + "#,
> + );
>
> Doesn't make sense for me to call cleanup separately I think - preview
> will both create the files and clean them up. We don't actually create the
> files until we enter the preview function even though we call
> fixture.createFile that's just a string in memory
>
> —
> You are receiving this because your review was requested.
> Reply to this email directly, view it on GitHub
> <#854>,
> or unsubscribe
> <https://github.com/notifications/unsubscribe-auth/AB4YZSPJRQ46XZL4I7EYFSDQSXGI7ANCNFSM4JJ7JCHA>
> .
>
|
@gabbifish makes sense! addressed |
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!!
wave goodbye to the fixtures directory
Wrangler no longer relies on reading fixtures from the file system and instead creates them in the tests themselves.