mirror of
https://github.com/TryGhost/Ghost.git
synced 2025-03-18 02:21:47 -05:00
Allowed .env file in source control for test-utils setup
refs https://github.com/TryGhost/members.js/issues/5 - We want to allow .env in source control mainly to use react-testing-library's recommended setup for common test-utils. It uses .env file to define NODE_PATH, which helps in avoiding relative imports in tests as we keep test files next to UI components. - CRA also by default suggests committing .env files to source control
This commit is contained in:
parent
c3907f24dd
commit
d83382ffb5
1 changed files with 7 additions and 6 deletions
13
ghost/portal/.gitignore
vendored
13
ghost/portal/.gitignore
vendored
|
@ -57,7 +57,7 @@ typings/
|
|||
.yarn-integrity
|
||||
|
||||
# dotenv environment variables file
|
||||
.env
|
||||
.env.*
|
||||
|
||||
# IDE
|
||||
.idea/*
|
||||
|
@ -72,8 +72,9 @@ typings/
|
|||
umd/
|
||||
build/
|
||||
|
||||
## config
|
||||
.env.local
|
||||
.env.development.local
|
||||
.env.test.local
|
||||
.env.production.local
|
||||
# Allow .env file
|
||||
!.env
|
||||
## We use .env file to define NODE_PATH as recommended test-utils setup pattern to avoid relative imports.
|
||||
# Refs: https://testing-library.com/docs/react-testing-library/setup#jest-and-create-react-app
|
||||
# CRA also suggests `.env` files should be checked into source control
|
||||
# Ref: https://create-react-app.dev/docs/adding-custom-environment-variables/#adding-development-environment-variables-in-env
|
Loading…
Add table
Reference in a new issue