Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
A
amundsen_dev
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Surendar Reddy Mangannagari
amundsen_dev
Commits
26954e80
Unverified
Commit
26954e80
authored
Aug 13, 2020
by
Marcos Iglesias
Committed by
GitHub
Aug 13, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixes TypeScript issues with sagas and saga tests (#573)
Signed-off-by:
Marcos Iglesias
<
miglesiasvalle@lyft.com
>
parent
52b31268
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
20 additions
and
18 deletions
+20
-18
global.d.ts
amundsen_application/static/global.d.ts
+2
-0
index.spec.ts
amundsen_application/static/js/ducks/bookmark/index.spec.ts
+4
-4
sagas.ts
amundsen_application/static/js/ducks/bookmark/sagas.ts
+1
-1
index.spec.ts
amundsen_application/static/js/ducks/user/index.spec.ts
+6
-6
package-lock.json
amundsen_application/static/package-lock.json
+6
-6
package.json
amundsen_application/static/package.json
+1
-1
No files found.
amundsen_application/static/global.d.ts
View file @
26954e80
export
{};
declare
const
require
:
{
declare
const
require
:
{
<
T
>
(
path
:
string
):
T
;
<
T
>
(
path
:
string
):
T
;
(
paths
:
string
[],
callback
:
(...
modules
:
any
[])
=>
void
):
void
;
(
paths
:
string
[],
callback
:
(...
modules
:
any
[])
=>
void
):
void
;
...
...
amundsen_application/static/js/ducks/bookmark/
tests/
index.spec.ts
→
amundsen_application/static/js/ducks/bookmark/index.spec.ts
View file @
26954e80
...
@@ -4,7 +4,7 @@ import { throwError } from 'redux-saga-test-plan/providers';
...
@@ -4,7 +4,7 @@ import { throwError } from 'redux-saga-test-plan/providers';
import
{
Bookmark
,
ResourceType
,
ResourceDict
}
from
'interfaces'
;
import
{
Bookmark
,
ResourceType
,
ResourceDict
}
from
'interfaces'
;
import
*
as
API
from
'.
.
/api/v0'
;
import
*
as
API
from
'./api/v0'
;
import
reducer
,
{
import
reducer
,
{
addBookmark
,
addBookmark
,
addBookmarkFailure
,
addBookmarkFailure
,
...
@@ -21,7 +21,7 @@ import reducer, {
...
@@ -21,7 +21,7 @@ import reducer, {
initialState
,
initialState
,
initialBookmarkState
,
initialBookmarkState
,
BookmarkReducerState
,
BookmarkReducerState
,
}
from
'.
.
/reducer'
;
}
from
'./reducer'
;
import
{
import
{
addBookmarkWatcher
,
addBookmarkWatcher
,
addBookmarkWorker
,
addBookmarkWorker
,
...
@@ -31,7 +31,7 @@ import {
...
@@ -31,7 +31,7 @@ import {
getBookmarkForUserWorker
,
getBookmarkForUserWorker
,
removeBookmarkWatcher
,
removeBookmarkWatcher
,
removeBookmarkWorker
,
removeBookmarkWorker
,
}
from
'.
.
/sagas'
;
}
from
'./sagas'
;
import
{
import
{
AddBookmark
,
AddBookmark
,
AddBookmarkRequest
,
AddBookmarkRequest
,
...
@@ -40,7 +40,7 @@ import {
...
@@ -40,7 +40,7 @@ import {
GetBookmarksForUserRequest
,
GetBookmarksForUserRequest
,
RemoveBookmark
,
RemoveBookmark
,
RemoveBookmarkRequest
,
RemoveBookmarkRequest
,
}
from
'.
.
/types'
;
}
from
'./types'
;
describe
(
'bookmark ducks'
,
()
=>
{
describe
(
'bookmark ducks'
,
()
=>
{
let
bookmarks
:
ResourceDict
<
Bookmark
[]
>
;
let
bookmarks
:
ResourceDict
<
Bookmark
[]
>
;
...
...
amundsen_application/static/js/ducks/bookmark/sagas.ts
View file @
26954e80
...
@@ -59,7 +59,7 @@ export function* removeBookmarkWatcher(): SagaIterator {
...
@@ -59,7 +59,7 @@ export function* removeBookmarkWatcher(): SagaIterator {
yield
takeEvery
(
RemoveBookmark
.
REQUEST
,
removeBookmarkWorker
);
yield
takeEvery
(
RemoveBookmark
.
REQUEST
,
removeBookmarkWorker
);
}
}
export
function
*
getBookmarksWorker
(
action
:
GetBookmarksRequest
):
SagaIterator
{
export
function
*
getBookmarksWorker
():
SagaIterator
{
let
response
;
let
response
;
try
{
try
{
response
=
yield
call
(
API
.
getBookmarks
);
response
=
yield
call
(
API
.
getBookmarks
);
...
...
amundsen_application/static/js/ducks/user/
tests/
index.spec.ts
→
amundsen_application/static/js/ducks/user/index.spec.ts
View file @
26954e80
...
@@ -4,7 +4,7 @@ import { LoggedInUser, PeopleUser, Resource, ResourceDict } from 'interfaces';
...
@@ -4,7 +4,7 @@ import { LoggedInUser, PeopleUser, Resource, ResourceDict } from 'interfaces';
import
globalState
from
'fixtures/globalState'
;
import
globalState
from
'fixtures/globalState'
;
import
*
as
API
from
'.
.
/api/v0'
;
import
*
as
API
from
'./api/v0'
;
import
reducer
,
{
import
reducer
,
{
getLoggedInUser
,
getLoggedInUser
,
getLoggedInUserFailure
,
getLoggedInUserFailure
,
...
@@ -22,7 +22,7 @@ import reducer, {
...
@@ -22,7 +22,7 @@ import reducer, {
initialState
,
initialState
,
initialOwnState
,
initialOwnState
,
UserReducerState
,
UserReducerState
,
}
from
'.
.
/reducer'
;
}
from
'./reducer'
;
import
{
import
{
getLoggedInUserWorker
,
getLoggedInUserWorker
,
getLoggedInUserWatcher
,
getLoggedInUserWatcher
,
...
@@ -32,8 +32,8 @@ import {
...
@@ -32,8 +32,8 @@ import {
getUserOwnWatcher
,
getUserOwnWatcher
,
getUserReadWorker
,
getUserReadWorker
,
getUserReadWatcher
,
getUserReadWatcher
,
}
from
'.
.
/sagas'
;
}
from
'./sagas'
;
import
{
GetLoggedInUser
,
GetUser
,
GetUserOwn
,
GetUserRead
}
from
'.
.
/types'
;
import
{
GetLoggedInUser
,
GetUser
,
GetUserOwn
,
GetUserRead
}
from
'./types'
;
describe
(
'user ducks'
,
()
=>
{
describe
(
'user ducks'
,
()
=>
{
let
currentUser
:
LoggedInUser
;
let
currentUser
:
LoggedInUser
;
...
@@ -247,7 +247,7 @@ describe('user ducks', () => {
...
@@ -247,7 +247,7 @@ describe('user ducks', () => {
describe
(
'getLoggedInUserWorker'
,
()
=>
{
describe
(
'getLoggedInUserWorker'
,
()
=>
{
it
(
'executes flow for returning the currentUser'
,
()
=>
{
it
(
'executes flow for returning the currentUser'
,
()
=>
{
testSaga
(
getLoggedInUserWorker
,
getLoggedInUser
()
)
testSaga
(
getLoggedInUserWorker
)
.
next
()
.
next
()
.
call
(
API
.
getLoggedInUser
)
.
call
(
API
.
getLoggedInUser
)
.
next
(
currentUser
)
.
next
(
currentUser
)
...
@@ -257,7 +257,7 @@ describe('user ducks', () => {
...
@@ -257,7 +257,7 @@ describe('user ducks', () => {
});
});
it
(
'handles request error'
,
()
=>
{
it
(
'handles request error'
,
()
=>
{
testSaga
(
getLoggedInUserWorker
,
getLoggedInUser
()
)
testSaga
(
getLoggedInUserWorker
)
.
next
()
.
next
()
.
throw
(
new
Error
())
.
throw
(
new
Error
())
.
put
(
getLoggedInUserFailure
())
.
put
(
getLoggedInUserFailure
())
...
...
amundsen_application/static/package-lock.json
View file @
26954e80
...
@@ -12245,7 +12245,7 @@
...
@@ -12245,7 +12245,7 @@
},
},
"css-select": {
"css-select": {
"version": "1.2.0",
"version": "1.2.0",
"resolved": "http
s
://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=",
"integrity": "sha1-KzoRBTnFNV8c2NMUYj6HCxIeyFg=",
"dev": true,
"dev": true,
"requires": {
"requires": {
...
@@ -12759,7 +12759,7 @@
...
@@ -12759,7 +12759,7 @@
"dependencies": {
"dependencies": {
"domelementtype": {
"domelementtype": {
"version": "1.1.3",
"version": "1.1.3",
"resolved": "http
s
://registry.npmjs.org/domelementtype/-/domelementtype-1.1.3.tgz",
"resolved": "http://registry.npmjs.org/domelementtype/-/domelementtype-1.1.3.tgz",
"integrity": "sha1-vSh3PiZCiBrsUVRJJCmcXNgiGFs=",
"integrity": "sha1-vSh3PiZCiBrsUVRJJCmcXNgiGFs=",
"dev": true
"dev": true
}
}
...
@@ -27515,9 +27515,9 @@
...
@@ -27515,9 +27515,9 @@
}
}
},
},
"redux-saga-test-plan": {
"redux-saga-test-plan": {
"version": "4.0.0-
beta
.3",
"version": "4.0.0-
rc
.3",
"resolved": "https://registry.npmjs.org/redux-saga-test-plan/-/redux-saga-test-plan-4.0.0-
beta
.3.tgz",
"resolved": "https://registry.npmjs.org/redux-saga-test-plan/-/redux-saga-test-plan-4.0.0-
rc
.3.tgz",
"integrity": "sha512-
nOA2MsUHlp5JGlGhDo8IbVnKXIh1qLCE4vZE5rz1wvdXLMEk6F9QwfI1LbdaBT0XdrxjeI+JjeUAMZ5sgYfeTA
==",
"integrity": "sha512-
18Ha1AWmP4Xt64cSyJv2j7sH8lwQzdk/LByiyhoNyuqyhzkQzlKlflHr3LqiSCzn3e2AgFxagynto8XGRqsHcg
==",
"dev": true,
"dev": true,
"requires": {
"requires": {
"core-js": "^2.4.1",
"core-js": "^2.4.1",
...
@@ -31866,7 +31866,7 @@
...
@@ -31866,7 +31866,7 @@
"dependencies": {
"dependencies": {
"json5": {
"json5": {
"version": "1.0.1",
"version": "1.0.1",
"resolved": "http
s
://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==",
"integrity": "sha512-aKS4WQjPenRxiQsC93MNfjx+nbF4PAdYzmd/1JIj8HYzqfbu86beTuNgXDzPknWk0n0uARlyewZo4s++ES36Ow==",
"dev": true,
"dev": true,
"requires": {
"requires": {
amundsen_application/static/package.json
View file @
26954e80
...
@@ -96,7 +96,7 @@
...
@@ -96,7 +96,7 @@
"react-docgen-typescript-loader"
:
"^3.7.2"
,
"react-docgen-typescript-loader"
:
"^3.7.2"
,
"redux-mock-store"
:
"^1.5.4"
,
"redux-mock-store"
:
"^1.5.4"
,
"redux-saga"
:
"^1.1.3"
,
"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"
,
"sass-loader"
:
"^7.3.1"
,
"style-loader"
:
"^0.20.3"
,
"style-loader"
:
"^0.20.3"
,
"stylelint"
:
"^13.6.0"
,
"stylelint"
:
"^13.6.0"
,
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment