Skip to content

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

@jeppes jeppes force-pushed the effect-router-spec branch from e59faeb to 38f9415 Compare April 21, 2020 13:47
@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 force-pushed the effect-router-spec branch from 27b90a0 to 38f9415 Compare April 21, 2020 14:05
@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.

1 participant