magento-research / peregrine

(Defunct) Moved to https://github.com/magento-research/pwa-studio
Open Software License 3.0
29 stars 1 forks source link

feat: Simulators for async testing #24

Closed zetlen closed 6 years ago

zetlen commented 6 years ago

Based on my comment here and @jimbo feeling positive about the idea, I've written a couple of helper components. They address a need we already have, and they help us round out Peregrine's starter collections.

From README:

DrewML commented 6 years ago

Missing an export in src/index.js - we don't want consumers to have to reach into @magento/peregrine/dist/*

zetlen commented 6 years ago

@jimbo @jcalcaben @DrewML Checking in: have my updates fixed the issues you found?

DrewML commented 6 years ago

In the future, would super appreciate if we could split something like this into separate PRs we iterate on. One of these components builds on the other, so it seems like a fairly natural progression.

Would make landing this much easier.

PWAStudioBot commented 6 years ago

All tests passed! View Coverage Report

A Storybook for this PR has been deployed!. It will be accessible as soon as the current build completes.

Generated by :no_entry_sign: dangerJS

zetlen commented 6 years ago

Any advice on how to generate a Storybook for this? Or, if that's not gating merge...we good?

DrewML commented 6 years ago

Any advice on how to generate a Storybook for this

Any nested dir with the name __stories__ in src will get picked up by storybook. You can look at the other story in the repo and examples in Storybook's docs.

if that's not gating merge

I wouldn't say it's gating merge since this PR was opened prior to the introduction of Storybook. Having said that, this is something that would actually be beneficial to have in Storybook, and I don't know how many people are going to use it without. Use your best judgement whether it should be in this PR or a follow-up.

zetlen commented 6 years ago

Thanks. I think we ought to have it in a followup, since the PR is already big enough. I can backlog that--I'm sure we'll have lots of PRs in the future that do nothing but improve testing and coverage.

DrewML commented 6 years ago

ship it