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

RFC: EffectRouterSpec #156

Draft
wants to merge 6 commits into
base: master
Choose a base branch
from
Draft

Conversation

jeppes
Copy link
Contributor

@jeppes jeppes commented Apr 21, 2020

I started implementing a given-when-then style test utility for the EffectRouter with the following syntax:

EffectRouterSpec.given(effectRouter)
    .when(.effect1)
    .then(
        expectEvents(.event1, .event2),
        expectSideEffects {
            // Verify that side effects were performed
            ... 
        }
    )

This is not yet documented. I am sharing this PR mainly to get feedback on the API.

@JensAyton @pettermahlen

@codecov
Copy link

codecov bot commented Apr 21, 2020

Codecov Report

Merging #156 into master will decrease coverage by 0.19%.
The diff coverage is 85.18%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #156      +/-   ##
==========================================
- Coverage   94.26%   94.07%   -0.20%     
==========================================
  Files          45       46       +1     
  Lines        1256     1283      +27     
==========================================
+ Hits         1184     1207      +23     
- Misses         72       76       +4     
Flag Coverage Δ
#ios 94.07% <85.18%> (-0.20%) ⬇️
#macspm 94.02% <85.18%> (-0.20%) ⬇️
Impacted Files Coverage Δ
MobiusTest/Source/EffectRouterSpec.swift 85.18% <85.18%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update fea8cb0...15b6219. Read the comment docs.

@jeppes jeppes marked this pull request as draft May 18, 2020 13:39
@jeppes jeppes changed the title Draft: EffectRouterSpec EffectRouterSpec May 18, 2020
@jeppes jeppes changed the title EffectRouterSpec RFC: EffectRouterSpec May 18, 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

1 participant