Northeastern-Electric-Racing / PM-Dashboard-v2

Northeastern Electric Racing Project Management Dashboard - version 2
https://nerpm.netlify.app
GNU Affero General Public License v3.0
15 stars 2 forks source link

[Frontend] - Move Test Files to Mirrored Folder Structure #771

Closed anthonybernardi closed 2 years ago

anthonybernardi commented 2 years ago

Description

Move all the frontend test files to a tests folder that mirrors the frontend structure.

For example: right now we have src/frontend/components/action-button/ and that folder has action-button.test.tsx and action-button.tsx. We want to make it so that we have src/frontend/components/action-button.tsx and src/frontend/tests/components/action-button.test.tsx.

If moving the test file would ever result in a folder that has only one file in it (like the tsx file in the above example), then move the file out of the folder and delete the folder since it is now redundant.

(see #770 for an explanation of why we want to do this)

Background

need to know how to move files and fix imports

Proposed Solution

  1. create a folder tests in the path src/frontend/tests/
  2. move each test file into tests to mirror the structure of the frontend
  3. make sure imports in the test files get fixed (either automatically by VSCode or manually -- should be automatic tho)

Mocks

No response