Skip to content
GitLab
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • C create-react-app
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 1,547
    • Issues 1,547
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 417
    • Merge requests 417
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages and registries
    • Packages and registries
    • Package Registry
    • Infrastructure Registry
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • Meta
  • create-react-app
  • Merge requests
  • !8824

Clarify docs for TS tests & test folder locations

  • Review changes

  • Download
  • Email patches
  • Plain diff
Closed Administrator requested to merge github/fork/justingrant/patch-1 into master Apr 12, 2020
  • Overview 10
  • Commits 1
  • Pipelines 0
  • Changes 1

Created by: justingrant

This PR makes the following improvements to existing documentation about location and file suffxes of test files:

  • Clarifies that CRA now (after CRA 2.1, AFAIK) supports tests that are written in TypeScript. This was important to document because Google misdirects users to pages like https://dev.to/thetrevorharmon/configuring-jest-and-enzyme-in-create-react-app-on-typescript-17mj or https://github.com/basarat/typescript-book/blob/master/docs/testing/jest.md#step-2-configure-jest which propose solutions using custom Jest configs that aren't needed (and sometimes don't work!) within a modern CRA environment.
  • Clarifies that a __tests__ folder cannot be a peer to src. This was already implied in the docs but IMHO wasn't stated explicitly enough to avoid errors (e.g. https://stackoverflow.com/questions/49602402/create-react-app-cannot-find-tests), so I added text that's very explicit to help users avoid this failure case.
  • Fixed a minor typo in existing text.
Assignee
Assign to
Reviewers
Request review from
Time tracking
Source branch: github/fork/justingrant/patch-1