@@ -45,95 +45,105 @@ UserService.getService = jest.fn().mockReturnValue(mockUserService);
45
45
test ( 'Module exports' , ( ) => expect ( actions ) . toMatchSnapshot ( ) ) ;
46
46
47
47
test ( 'profile.uploadPhotoDone' , async ( ) => {
48
- const actionResult =
49
- await redux . resolveAction ( actions . profile . uploadPhotoDone ( handle , tokenV3 ) ) ;
48
+ const actionResult = await redux . resolveAction ( actions . profile . uploadPhotoDone ( handle , tokenV3 ) ) ;
50
49
expect ( actionResult ) . toMatchSnapshot ( ) ;
51
50
expect ( mockMembersService . getPresignedUrl ) . toBeCalled ( ) ;
52
51
expect ( mockMembersService . uploadFileToS3 ) . toBeCalled ( ) ;
53
52
expect ( mockMembersService . updateMemberPhoto ) . toBeCalled ( ) ;
54
53
} ) ;
55
54
56
55
test ( 'profile.updateProfileDone' , async ( ) => {
57
- const actionResult =
58
- await redux . resolveAction ( actions . profile . updateProfileDone ( profile , tokenV3 ) ) ;
56
+ const actionResult = await redux . resolveAction (
57
+ actions . profile . updateProfileDone ( profile , tokenV3 ) ,
58
+ ) ;
59
59
expect ( actionResult ) . toMatchSnapshot ( ) ;
60
60
expect ( mockMembersService . updateMemberProfile ) . toBeCalled ( ) ;
61
61
} ) ;
62
62
63
63
test ( 'profile.addSkillDone' , async ( ) => {
64
- const actionResult =
65
- await redux . resolveAction ( actions . profile . addSkillDone ( handle , tokenV3 , skill ) ) ;
64
+ const actionResult = await redux . resolveAction (
65
+ actions . profile . addSkillDone ( handle , tokenV3 , skill ) ,
66
+ ) ;
66
67
expect ( actionResult ) . toMatchSnapshot ( ) ;
67
68
expect ( mockMembersService . addSkill ) . toBeCalled ( ) ;
68
69
} ) ;
69
70
70
71
test ( 'profile.hideSkillDone' , async ( ) => {
71
- const actionResult =
72
- await redux . resolveAction ( actions . profile . hideSkillDone ( handle , tokenV3 , skill ) ) ;
72
+ const actionResult = await redux . resolveAction (
73
+ actions . profile . hideSkillDone ( handle , tokenV3 , skill ) ,
74
+ ) ;
73
75
expect ( actionResult ) . toMatchSnapshot ( ) ;
74
76
expect ( mockMembersService . hideSkill ) . toBeCalled ( ) ;
75
77
} ) ;
76
78
77
79
test ( 'profile.addWebLinkDone' , async ( ) => {
78
- const actionResult =
79
- await redux . resolveAction ( actions . profile . addWebLinkDone ( handle , tokenV3 , weblink ) ) ;
80
+ const actionResult = await redux . resolveAction (
81
+ actions . profile . addWebLinkDone ( handle , tokenV3 , weblink ) ,
82
+ ) ;
80
83
expect ( actionResult ) . toMatchSnapshot ( ) ;
81
84
expect ( mockMembersService . addWebLink ) . toBeCalled ( ) ;
82
85
} ) ;
83
86
84
87
test ( 'profile.deleteWebLinkDone' , async ( ) => {
85
- const actionResult =
86
- await redux . resolveAction ( actions . profile . deleteWebLinkDone ( handle , tokenV3 , weblink ) ) ;
88
+ const actionResult = await redux . resolveAction (
89
+ actions . profile . deleteWebLinkDone ( handle , tokenV3 , weblink ) ,
90
+ ) ;
87
91
expect ( actionResult ) . toMatchSnapshot ( ) ;
88
92
expect ( mockMembersService . deleteWebLink ) . toBeCalled ( ) ;
89
93
} ) ;
90
94
91
95
test ( 'profile.linkExternalAccountDone' , async ( ) => {
92
- const actionResult =
93
- await redux . resolveAction ( actions . profile . linkExternalAccountDone ( profile , tokenV3 , 'github' ) ) ;
96
+ const actionResult = await redux . resolveAction (
97
+ actions . profile . linkExternalAccountDone ( profile , tokenV3 , 'github' ) ,
98
+ ) ;
94
99
expect ( actionResult ) . toMatchSnapshot ( ) ;
95
100
expect ( mockUserService . linkExternalAccount ) . toBeCalled ( ) ;
96
101
} ) ;
97
102
98
103
test ( 'profile.unlinkExternalAccountDone' , async ( ) => {
99
- const actionResult =
100
- await redux . resolveAction ( actions . profile . unlinkExternalAccountDone ( profile , tokenV3 , 'github' ) ) ;
104
+ const actionResult = await redux . resolveAction (
105
+ actions . profile . unlinkExternalAccountDone ( profile , tokenV3 , 'github' ) ,
106
+ ) ;
101
107
expect ( actionResult ) . toMatchSnapshot ( ) ;
102
108
expect ( mockUserService . unlinkExternalAccount ) . toBeCalled ( ) ;
103
109
} ) ;
104
110
105
111
test ( 'profile.getLinkedAccountsDone' , async ( ) => {
106
- const actionResult =
107
- await redux . resolveAction ( actions . profile . getLinkedAccountsDone ( profile , tokenV3 ) ) ;
112
+ const actionResult = await redux . resolveAction (
113
+ actions . profile . getLinkedAccountsDone ( profile , tokenV3 ) ,
114
+ ) ;
108
115
expect ( actionResult ) . toMatchSnapshot ( ) ;
109
116
expect ( mockUserService . getLinkedAccounts ) . toBeCalled ( ) ;
110
117
} ) ;
111
118
112
119
test ( 'profile.getCredentialDone' , async ( ) => {
113
- const actionResult =
114
- await redux . resolveAction ( actions . profile . getCredentialDone ( profile , tokenV3 ) ) ;
120
+ const actionResult = await redux . resolveAction (
121
+ actions . profile . getCredentialDone ( profile , tokenV3 ) ,
122
+ ) ;
115
123
expect ( actionResult ) . toMatchSnapshot ( ) ;
116
124
expect ( mockUserService . getCredential ) . toBeCalled ( ) ;
117
125
} ) ;
118
126
119
127
test ( 'profile.getEmailPreferencesDone' , async ( ) => {
120
- const actionResult =
121
- await redux . resolveAction ( actions . profile . getEmailPreferencesDone ( profile , tokenV3 ) ) ;
128
+ const actionResult = await redux . resolveAction (
129
+ actions . profile . getEmailPreferencesDone ( profile , tokenV3 ) ,
130
+ ) ;
122
131
expect ( actionResult ) . toMatchSnapshot ( ) ;
123
132
expect ( mockUserService . getEmailPreferences ) . toBeCalled ( ) ;
124
133
} ) ;
125
134
126
135
test ( 'profile.saveEmailPreferencesDone' , async ( ) => {
127
- const actionResult =
128
- await redux . resolveAction ( actions . profile . saveEmailPreferencesDone ( profile , tokenV3 , { } ) ) ;
136
+ const actionResult = await redux . resolveAction (
137
+ actions . profile . saveEmailPreferencesDone ( profile , tokenV3 , { } ) ,
138
+ ) ;
129
139
expect ( actionResult ) . toMatchSnapshot ( ) ;
130
140
expect ( mockUserService . saveEmailPreferences ) . toBeCalled ( ) ;
131
141
} ) ;
132
142
133
143
test ( 'profile.updatePasswordDone' , async ( ) => {
134
- const actionResult =
135
- await redux . resolveAction ( actions . profile . updatePasswordDone ( profile , tokenV3 , 'newPassword' , 'oldPassword' ) ) ;
144
+ const actionResult = await redux . resolveAction (
145
+ actions . profile . updatePasswordDone ( profile , tokenV3 , 'newPassword' , 'oldPassword' ) ,
146
+ ) ;
136
147
expect ( actionResult ) . toMatchSnapshot ( ) ;
137
148
expect ( mockUserService . updatePassword ) . toBeCalled ( ) ;
138
149
} ) ;
139
-
0 commit comments