summaryrefslogtreecommitdiff
path: root/spec/frontend/error_tracking/store/actions_spec.js
diff options
context:
space:
mode:
Diffstat (limited to 'spec/frontend/error_tracking/store/actions_spec.js')
-rw-r--r--spec/frontend/error_tracking/store/actions_spec.js19
1 files changed, 7 insertions, 12 deletions
diff --git a/spec/frontend/error_tracking/store/actions_spec.js b/spec/frontend/error_tracking/store/actions_spec.js
index aaaa1194a29..6bac21341a7 100644
--- a/spec/frontend/error_tracking/store/actions_spec.js
+++ b/spec/frontend/error_tracking/store/actions_spec.js
@@ -28,9 +28,9 @@ describe('Sentry common store actions', () => {
const params = { endpoint, redirectUrl, status };
describe('updateStatus', () => {
- it('should handle successful status update', (done) => {
+ it('should handle successful status update', async () => {
mock.onPut().reply(200, {});
- testAction(
+ await testAction(
actions.updateStatus,
params,
{},
@@ -41,20 +41,15 @@ describe('Sentry common store actions', () => {
},
],
[],
- () => {
- done();
- expect(visitUrl).toHaveBeenCalledWith(redirectUrl);
- },
);
+ expect(visitUrl).toHaveBeenCalledWith(redirectUrl);
});
- it('should handle unsuccessful status update', (done) => {
+ it('should handle unsuccessful status update', async () => {
mock.onPut().reply(400, {});
- testAction(actions.updateStatus, params, {}, [], [], () => {
- expect(visitUrl).not.toHaveBeenCalled();
- expect(createFlash).toHaveBeenCalledTimes(1);
- done();
- });
+ await testAction(actions.updateStatus, params, {}, [], []);
+ expect(visitUrl).not.toHaveBeenCalled();
+ expect(createFlash).toHaveBeenCalledTimes(1);
});
});