Browse Source

test: transpile modal ahead of tests (#32972)

The modals are being loaded during the test lazily. This change preloads the
modal in question in a before all so that the individual tests run fast.
Tony Xiao 3 years ago
parent
commit
09694b6999

+ 6 - 0
tests/js/spec/views/settings/projectDebugFiles/customRepositories.spec.tsx

@@ -88,6 +88,12 @@ describe('Custom Repositories', function () {
     type: CustomRepoType.APP_STORE_CONNECT,
   };
 
+  beforeAll(async function () {
+    // TODO: figure out why this transpile is so slow
+    // transpile the modal upfront so the test runs fast
+    await import('sentry/components/modals/debugFileCustomRepository');
+  });
+
   it('renders', async function () {
     const {rerender} = render(<TestComponent {...props} />, {context: routerContext});