Browse Source

ref(tsc): convert index.spec to tsx (#52710)

Convert index.spec to tsx
Jonas 1 year ago
parent
commit
9af973bfb2
1 changed files with 3 additions and 4 deletions
  1. 3 4
      static/app/views/discover/index.spec.tsx

+ 3 - 4
static/app/views/discover/index.spec.jsx → static/app/views/discover/index.spec.tsx

@@ -73,8 +73,7 @@ describe('Discover > Landing', function () {
     render(
       <DiscoverLanding
         organization={TestStubs.Organization()}
-        location={{query: {}}}
-        router={{}}
+        {...TestStubs.routeComponentProps()}
       />
     );
 
@@ -84,7 +83,7 @@ describe('Discover > Landing', function () {
   it('has the right sorts', function () {
     const org = TestStubs.Organization({features});
 
-    render(<DiscoverLanding organization={org} location={{query: {}}} router={{}} />);
+    render(<DiscoverLanding organization={org} {...TestStubs.routeComponentProps()} />);
 
     const expectedSorts = [
       'My Queries',
@@ -109,7 +108,7 @@ describe('Discover > Landing', function () {
   it('links back to the homepage', () => {
     const org = TestStubs.Organization({features});
 
-    render(<DiscoverLanding organization={org} location={{query: {}}} router={{}} />, {
+    render(<DiscoverLanding organization={org} {...TestStubs.routeComponentProps()} />, {
       context: TestStubs.routerContext(),
     });