no log: Fix test environment

This commit is contained in:
LASER-Yi 2022-03-29 11:24:37 +08:00
parent 0efa73670c
commit ea9ad0625f
2 changed files with 6 additions and 6 deletions

View file

@ -44,7 +44,7 @@
"eslint-config-react-app": "^7.0.0", "eslint-config-react-app": "^7.0.0",
"eslint-plugin-react-hooks": "^4.3.0", "eslint-plugin-react-hooks": "^4.3.0",
"husky": "^7", "husky": "^7",
"jsdom": "*", "jsdom": "latest",
"lodash": "^4", "lodash": "^4",
"moment": "^2.29.1", "moment": "^2.29.1",
"prettier": "^2", "prettier": "^2",
@ -58,9 +58,9 @@
"rooks": "^5.7.1", "rooks": "^5.7.1",
"sass": "^1", "sass": "^1",
"typescript": "^4", "typescript": "^4",
"vite": "*", "vite": "latest",
"vite-plugin-checker": "^0.3.4", "vite-plugin-checker": "^0.3.4",
"vitest": "*" "vitest": "latest"
} }
}, },
"node_modules/@babel/code-frame": { "node_modules/@babel/code-frame": {

View file

@ -1,6 +1,6 @@
export const isDevEnv = import.meta.env.DEV; export const isDevEnv = import.meta.env.MODE === "development";
export const isProdEnv = import.meta.env.PROD; export const isProdEnv = import.meta.env.MODE === "production";
export const isTestEnv = false; export const isTestEnv = import.meta.env.MODE === "test";
export const Environment = { export const Environment = {
get apiKey(): string | undefined { get apiKey(): string | undefined {