Browse Source

ref(rtl): Remove unused RTL context parameters (#63034)

These are just here to confuse us
Evan Purkhiser 1 year ago
parent
commit
807d825f41

+ 1 - 5
static/app/views/performance/transactionSummary/transactionOverview/index.spec.tsx

@@ -659,11 +659,7 @@ describe('Performance > TransactionSummary', function () {
           router={router}
           location={router.location}
         />,
-        {
-          context: routerContext,
-          organization,
-          projects: projects.map(project => project.id),
-        }
+        {context: routerContext, organization}
       );
 
       renderGlobalModal();

+ 11 - 5
tests/js/sentry-test/reactTestingLibrary.tsx

@@ -20,10 +20,18 @@ import {instrumentUserEvent} from '../instrumentedEnv/userEventIntegration';
 import {initializeOrg} from './initializeOrg';
 
 type ProviderOptions = {
+  /**
+   * Sets legacy context providers. This value is directly passed to a
+   * `getChildContext`.
+   */
   context?: Record<string, any>;
+  /**
+   * Sets the OrganizationContext
+   */
   organization?: Partial<Organization>;
-  project?: string;
-  projects?: string[];
+  /**
+   * Sets the RouterContext
+   */
   router?: Partial<InjectedRouter>;
 };
 
@@ -89,7 +97,7 @@ function makeAllTheProviders({context, ...initializeOrgOptions}: ProviderOptions
  */
 function render(ui: React.ReactElement, options?: Options) {
   options = options ?? {};
-  const {context, organization, project, projects, ...otherOptions} = options;
+  const {context, organization, ...otherOptions} = options;
   let {router} = options;
 
   if (router === undefined && context?.context?.router) {
@@ -99,8 +107,6 @@ function render(ui: React.ReactElement, options?: Options) {
   const AllTheProviders = makeAllTheProviders({
     context,
     organization,
-    project,
-    projects,
     router,
   });