Unverified Commit 26954e80 authored by Marcos Iglesias's avatar Marcos Iglesias Committed by GitHub

Fixes TypeScript issues with sagas and saga tests (#573)

Signed-off-by: 's avatarMarcos Iglesias <miglesiasvalle@lyft.com>
parent 52b31268
export {};
declare const require: {
<T>(path: string): T;
(paths: string[], callback: (...modules: any[]) => void): void;
......
......@@ -4,7 +4,7 @@ import { throwError } from 'redux-saga-test-plan/providers';
import { Bookmark, ResourceType, ResourceDict } from 'interfaces';
import * as API from '../api/v0';
import * as API from './api/v0';
import reducer, {
addBookmark,
addBookmarkFailure,
......@@ -21,7 +21,7 @@ import reducer, {
initialState,
initialBookmarkState,
BookmarkReducerState,
} from '../reducer';
} from './reducer';
import {
addBookmarkWatcher,
addBookmarkWorker,
......@@ -31,7 +31,7 @@ import {
getBookmarkForUserWorker,
removeBookmarkWatcher,
removeBookmarkWorker,
} from '../sagas';
} from './sagas';
import {
AddBookmark,
AddBookmarkRequest,
......@@ -40,7 +40,7 @@ import {
GetBookmarksForUserRequest,
RemoveBookmark,
RemoveBookmarkRequest,
} from '../types';
} from './types';
describe('bookmark ducks', () => {
let bookmarks: ResourceDict<Bookmark[]>;
......
......@@ -59,7 +59,7 @@ export function* removeBookmarkWatcher(): SagaIterator {
yield takeEvery(RemoveBookmark.REQUEST, removeBookmarkWorker);
}
export function* getBookmarksWorker(action: GetBookmarksRequest): SagaIterator {
export function* getBookmarksWorker(): SagaIterator {
let response;
try {
response = yield call(API.getBookmarks);
......
......@@ -4,7 +4,7 @@ import { LoggedInUser, PeopleUser, Resource, ResourceDict } from 'interfaces';
import globalState from 'fixtures/globalState';
import * as API from '../api/v0';
import * as API from './api/v0';
import reducer, {
getLoggedInUser,
getLoggedInUserFailure,
......@@ -22,7 +22,7 @@ import reducer, {
initialState,
initialOwnState,
UserReducerState,
} from '../reducer';
} from './reducer';
import {
getLoggedInUserWorker,
getLoggedInUserWatcher,
......@@ -32,8 +32,8 @@ import {
getUserOwnWatcher,
getUserReadWorker,
getUserReadWatcher,
} from '../sagas';
import { GetLoggedInUser, GetUser, GetUserOwn, GetUserRead } from '../types';
} from './sagas';
import { GetLoggedInUser, GetUser, GetUserOwn, GetUserRead } from './types';
describe('user ducks', () => {
let currentUser: LoggedInUser;
......@@ -247,7 +247,7 @@ describe('user ducks', () => {
describe('getLoggedInUserWorker', () => {
it('executes flow for returning the currentUser', () => {
testSaga(getLoggedInUserWorker, getLoggedInUser())
testSaga(getLoggedInUserWorker)
.next()
.call(API.getLoggedInUser)
.next(currentUser)
......@@ -257,7 +257,7 @@ describe('user ducks', () => {
});
it('handles request error', () => {
testSaga(getLoggedInUserWorker, getLoggedInUser())
testSaga(getLoggedInUserWorker)
.next()
.throw(new Error())
.put(getLoggedInUserFailure())
......
......@@ -12245,7 +12245,7 @@
},
"css-select": {
"version": "1.2.0",
"resolved": "https://registry.npmjs.org/css-select/-/css-select-1.2.0.tgz",
"resolved": "http://registry.npmjs.org/css-select/-/css-select-1.2.0.tgz",
"integrity": "sha1-KzoRBTnFNV8c2NMUYj6HCxIeyFg=",
"dev": true,
"requires": {
......@@ -12759,7 +12759,7 @@
"dependencies": {
"domelementtype": {
"version": "1.1.3",
"resolved": "https://registry.npmjs.org/domelementtype/-/domelementtype-1.1.3.tgz",
"resolved": "http://registry.npmjs.org/domelementtype/-/domelementtype-1.1.3.tgz",
"integrity": "sha1-vSh3PiZCiBrsUVRJJCmcXNgiGFs=",
"dev": true
}
......@@ -27515,9 +27515,9 @@
}
},
"redux-saga-test-plan": {
"version": "4.0.0-beta.3",
"resolved": "https://registry.npmjs.org/redux-saga-test-plan/-/redux-saga-test-plan-4.0.0-beta.3.tgz",
"integrity": "sha512-nOA2MsUHlp5JGlGhDo8IbVnKXIh1qLCE4vZE5rz1wvdXLMEk6F9QwfI1LbdaBT0XdrxjeI+JjeUAMZ5sgYfeTA==",
"version": "4.0.0-rc.3",
"resolved": "https://registry.npmjs.org/redux-saga-test-plan/-/redux-saga-test-plan-4.0.0-rc.3.tgz",
"integrity": "sha512-18Ha1AWmP4Xt64cSyJv2j7sH8lwQzdk/LByiyhoNyuqyhzkQzlKlflHr3LqiSCzn3e2AgFxagynto8XGRqsHcg==",
"dev": true,
"requires": {
"core-js": "^2.4.1",
......@@ -31866,7 +31866,7 @@
"dependencies": {
"json5": {
"version": "1.0.1",
"resolved": "https://registry.npmjs.org/json5/-/json5-1.0.1.tgz",
"resolved": "http://registry.npmjs.org/json5/-/json5-1.0.1.tgz",
"integrity": "sha512-aKS4WQjPenRxiQsC93MNfjx+nbF4PAdYzmd/1JIj8HYzqfbu86beTuNgXDzPknWk0n0uARlyewZo4s++ES36Ow==",
"dev": true,
"requires": {
......@@ -96,7 +96,7 @@
"react-docgen-typescript-loader": "^3.7.2",
"redux-mock-store": "^1.5.4",
"redux-saga": "^1.1.3",
"redux-saga-test-plan": "4.0.0-beta.3",
"redux-saga-test-plan": "4.0.0-rc.3",
"sass-loader": "^7.3.1",
"style-loader": "^0.20.3",
"stylelint": "^13.6.0",
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment