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

Add support for testing bound effects #50

Merged
merged 7 commits into from
Apr 26, 2019
Merged

Conversation

HenriBeck
Copy link
Collaborator

@HenriBeck HenriBeck commented Apr 22, 2019

Currently, there is no way of testing your bound functions, so I created a similar interface for it as the saga test.

The only difference is that we are calling and expecting a return value instead of just dispatching an action. Asserting the return value is currently optional though this might not want we want.

@HenriBeck HenriBeck requested a review from tp April 22, 2019 17:47
@tp
Copy link
Owner

tp commented Apr 23, 2019

@HenriBeck Do you still use these in app? I was hoping with the switch to TS 3.4 we could drop them entirely, just kept them around for legacy reasons.

I mean, I wouldn't want anyone writing the anew & then write tests for them unless they must do so due to being stuck on 3.3. (as OMS is).

Will have a look at the changes later today!

src/lib/testing/create-test-env.ts Show resolved Hide resolved
src/lib/testing/expect-bound-function.ts Show resolved Hide resolved
src/lib/testing/expect-saga.ts Outdated Show resolved Hide resolved
src/test-app/__tests__/expectBoundFunction.test.ts Outdated Show resolved Hide resolved
src/test-app/__tests__/expectBoundFunction.test.ts Outdated Show resolved Hide resolved
@tp tp merged commit 552355f into master Apr 26, 2019
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.

2 participants