-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1277 from oasisprotocol/lw/test-env-types
Test and fix process.env types
- Loading branch information
Showing
3 changed files
with
13 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
Test and fix process.env types |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -29,3 +29,5 @@ declare global { | |
} | ||
} | ||
} | ||
|
||
export {} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
export function ExpectEnvToHaveStrictType() { | ||
process.env.REACT_APP_SHOW_BUILD_BANNERS = undefined | ||
process.env.REACT_APP_SHOW_BUILD_BANNERS = 'true' | ||
process.env.REACT_APP_API = 'https://' | ||
|
||
// @ts-expect-error Expect typescript to detect unsupported value | ||
process.env.REACT_APP_SHOW_BUILD_BANNERS = 'unsupported_value' | ||
// @ts-expect-error Expect typescript to detect required field | ||
process.env.REACT_APP_API = undefined | ||
} |