Code Placement
Put reusable test code shared across process types in a testing directory at the part root. Put reusable test code specific to one process type in a testing directory at that process root. Put integration tests in an integrationTests directory at the applicable part or process root, according to their scope. Keep unit tests beside the source files they test, using the sibling xTests filename convention.
Philosophy
Reusable test code belongs at the broadest owning scope where it can be shared. Separate reusable test support from integration suites, and keep unit tests close to the implementations they verify.
Correct
payment/testing/paymentMockProvider.js
payment/api/testing/paymentGatewayMockProvider.js
payment/panel/testing/renderPaymentForm.jsx
payment/integrationTests/paymentFlowTests.js
payment/api/integrationTests/paymentReconciliationTests.js
payment/api/business/paymentIntent/preparePayment.js
payment/api/business/paymentIntent/preparePaymentTests.js
Incorrect
payment/tests/paymentMockProvider.js
payment/api/business/paymentIntent/paymentMockProvider.js
payment/api/testing/integration/paymentFlowTests.js
payment/api/testing/preparePaymentTests.js
Fix
Move reusable test code to the appropriate part-root or process-root testing directory. Move integration tests to the corresponding integrationTests directory. Keep unit tests beside their source files, preserve semantic filenames, and update imports, test discovery, and composition mappings as needed.