We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Hi can you add option to forbid using typed-redux-saga and typed-redux-saga/macro?
typed-redux-saga
typed-redux-saga/macro
Here is example of saga:
import { call } from 'typed-redux-saga/macro'; function saga() { yield* call(myFunction); }
I want to use typed-redux-saga/macro only in source code of application and redux-saga/effects only in tests.
redux-saga/effects
Bcause tests like this:
import { call } from 'typed-redux-saga/macro'; import { saga } from '../saga'; it('test', () => { const gen = saga(); expect(gen.next().value).toEqual(call(myFunction)); });
are misleading.
In this case call effect are delegated by yield* and the correct check should be:
call
yield*
expect(gen.next().value).toEqual(call(myFunction).next().value);
The text was updated successfully, but these errors were encountered:
// jest.config transform: { '^.+\\.js(x)?$': 'babel-jest', '^.+\\.ts(x)?$': 'babel-jest', '^.+\\.ts(x)?$': [ 'ts-jest', { tsconfig: 'tsconfig.spec.json', }, ], }, // ut import {testSaga} from 'redux-saga-test-plan'; import {initialRealm, initialSaga} from '~store/sagas/initial'; test('initialSaga', () => { testSaga(initialSaga).next().call(initialRealm).next().isDone(); });
Sorry, something went wrong.
@feidaZhang But in your example there is no eslint
No branches or pull requests
Hi can you add option to forbid using
typed-redux-saga
andtyped-redux-saga/macro
?Here is example of saga:
I want to use
typed-redux-saga/macro
only in source code of application andredux-saga/effects
only in tests.Bcause tests like this:
are misleading.
In this case
call
effect are delegated byyield*
and the correct check should be:The text was updated successfully, but these errors were encountered: