File tree 2 files changed +6
-6
lines changed
2 files changed +6
-6
lines changed Original file line number Diff line number Diff line change 1
- const MOCK_GROUPS_REQ_URL = 'https://api.topcoder-dev.com/v3 /groups?memberId=12345&membershipType=user' ;
2
- const MOCK_PROFILE_REQ_URL = 'https://api.topcoder-dev.com/v3 /members/username12345' ;
1
+ const MOCK_GROUPS_REQ_URL = 'https://api.topcoder-dev.com/v5 /groups?memberId=12345&membershipType=user' ;
2
+ const MOCK_PROFILE_REQ_URL = 'https://api.topcoder-dev.com/v5 /members/username12345' ;
3
3
4
4
jest . mock ( 'isomorphic-fetch' , ( ) => jest . fn ( url => Promise . resolve ( {
5
+ ok : true ,
5
6
json : ( ) => {
6
7
let content ;
7
8
switch ( url ) {
8
9
case MOCK_GROUPS_REQ_URL : content = [ 'Group1' , 'Group2' ] ; break ;
9
- case MOCK_PROFILE_REQ_URL : content = { userId : 12345 } ; break ;
10
+ case MOCK_PROFILE_REQ_URL : content = [ { userId : 12345 } ] ; break ;
10
11
default : throw new Error ( 'Unexpected URL!' ) ;
11
12
}
12
- return {
13
- result : { content, status : 200 } ,
14
- } ;
13
+ return content ;
15
14
} ,
16
15
} ) ) ) ;
17
16
Original file line number Diff line number Diff line change @@ -2,6 +2,7 @@ module.exports = {
2
2
API : {
3
3
V2 : 'https://api.topcoder-dev.com/v2' ,
4
4
V3 : 'https://api.topcoder-dev.com/v3' ,
5
+ V5 : 'https://api.topcoder-dev.com/v5' ,
5
6
} ,
6
7
dummyConfigKey : 'Dummy config value' ,
7
8
SECRET : {
You can’t perform that action at this time.
0 commit comments