Skip to content

RFC: EffectRouterSpec#156

Draft
jeppes wants to merge 6 commits into
spotify:masterfrom
jeppes:effect-router-spec
Draft

RFC: EffectRouterSpec#156
jeppes wants to merge 6 commits into
spotify:masterfrom
jeppes:effect-router-spec

Conversation

@jeppes
Copy link
Copy Markdown
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
Copy Markdown

codecov Bot commented Apr 21, 2020

Codecov Report

❌ Patch coverage is 85.18519% with 4 lines in your changes missing coverage. Please review.
✅ Project coverage is 94.07%. Comparing base (fea8cb0) to head (15b6219).
⚠️ Report is 89 commits behind head on master.

Files with missing lines Patch % Lines
MobiusTest/Source/EffectRouterSpec.swift 85.18% 4 Missing ⚠️
Additional details and impacted files
@@            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%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@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