Browse Source

ref(ts): Convert eventCause.spec to tsx (#51989)

Evan Purkhiser 1 year ago
parent
commit
6f9b625e84
1 changed files with 5 additions and 6 deletions
  1. 5 6
      static/app/components/events/eventCause.spec.tsx

+ 5 - 6
static/app/components/events/eventCause.spec.jsx → static/app/components/events/eventCause.spec.tsx

@@ -1,6 +1,5 @@
 import {render, screen, userEvent} from 'sentry-test/reactTestingLibrary';
 
-import {Client} from 'sentry/api';
 import {EventCause} from 'sentry/components/events/eventCause';
 
 import {CommitRow} from '../commitRow';
@@ -49,11 +48,11 @@ describe('EventCause', function () {
   ];
 
   afterEach(function () {
-    Client.clearMockResponses();
+    MockApiClient.clearMockResponses();
   });
 
   beforeEach(function () {
-    Client.addMockResponse({
+    MockApiClient.addMockResponse({
       method: 'GET',
       url: `/projects/${organization.slug}/${project.slug}/events/${event.id}/committers/`,
       body: {
@@ -99,8 +98,8 @@ describe('EventCause', function () {
 
   it('renders correct heading for single commit', async () => {
     // For this one test, undo the `beforeEach` so that we can respond with just a single commit
-    Client.clearMockResponses();
-    Client.addMockResponse({
+    MockApiClient.clearMockResponses();
+    MockApiClient.addMockResponse({
       method: 'GET',
       url: `/projects/${organization.slug}/${project.slug}/events/${event.id}/committers/`,
       body: {
@@ -163,7 +162,7 @@ describe('EventCause', function () {
   });
 
   it('shows unassociated email warning', async function () {
-    Client.addMockResponse({
+    MockApiClient.addMockResponse({
       method: 'GET',
       url: `/projects/${organization.slug}/${project.slug}/events/${event.id}/committers/`,
       body: {