On module 6 in the "Mocking - Demo" video, a get the error "TypeError: (0 , _fetchQuestionSaga.handleFetchQuestion) is not a function"
This is that I have
import { handleFetchQuestion } from "./fetch-question-saga";
describe("Fetch questions saga", () => {
it("should fetch the questions", async () => {
const gen = handleFetchQuestion({ question_id: 42 });
const { value } = await gen.next();
});
});
The jest output is
FAIL src/sagas/fetch-question-saga.spec.js
Fetch questions saga
× should fetch the questions (2 ms)
● Fetch questions saga › should fetch the questions
TypeError: (0 , _fetchQuestionSaga.handleFetchQuestion) is not a function
3 | describe("Fetch questions saga", () => {
4 | it("should fetch the questions", async () => {
> 5 | const gen = handleFetchQuestion({ question_id: 42 });
| ^
6 | const { value } = await gen.next();
7 | });
8 | });
at Object.<anonymous> (src/sagas/fetch-question-saga.spec.js:5:17)
Test Suites: 1 failed, 1 total
Tests: 1 failed, 1 total
Snapshots: 0 total
Time: 2.148 s
Ran all test suites matching /fetch-question/i.
On module 6 in the "Mocking - Demo" video, a get the error "TypeError: (0 , _fetchQuestionSaga.handleFetchQuestion) is not a function"
This is that I have
The jest output is