chore: replace all cn comments of fe to en version by volc api (#320)

This commit is contained in:
tecvan
2025-07-31 10:32:15 +08:00
committed by GitHub
parent 716ec0cba8
commit 71f6245a01
2960 changed files with 15545 additions and 15545 deletions

View File

@@ -14,7 +14,7 @@
* limitations under the License.
*/
// 引入我们的被测方法
// Introducing our test method
import { describe, expect, it, vi } from 'vitest';
@@ -23,39 +23,39 @@ import { getEnv } from '@/util/get-env';
describe('getEnv function', () => {
it('should return "cn-boe" when not in production', () => {
vi.stubGlobal('IS_PROD', undefined);
// 不设置IS_PROD默认为非生产环境
// Do not set IS_PROD, default to non-production environment
const env = getEnv();
expect(env).toBe('cn-boe');
});
it('should return "cn-release" when in production, not overseas, and is release version', () => {
vi.stubGlobal('IS_PROD', true); // 设置为生产环境
vi.stubGlobal('IS_OVERSEA', false); // 不是海外
vi.stubGlobal('IS_RELEASE_VERSION', true); // 是发布版本
vi.stubGlobal('IS_PROD', true); // Set to production environment
vi.stubGlobal('IS_OVERSEA', false); // Not overseas.
vi.stubGlobal('IS_RELEASE_VERSION', true); // Is the release version
const env = getEnv();
expect(env).toBe('cn-release');
});
it('should return "cn-inhouse" when in production, not overseas, and is not release version', () => {
vi.stubGlobal('IS_PROD', true); // 设置为生产环境
vi.stubGlobal('IS_OVERSEA', false); // 不是海外
vi.stubGlobal('IS_RELEASE_VERSION', false); // 不是发布版本
vi.stubGlobal('IS_PROD', true); // Set to production environment
vi.stubGlobal('IS_OVERSEA', false); // Not overseas.
vi.stubGlobal('IS_RELEASE_VERSION', false); // Not the release version
const env = getEnv();
expect(env).toBe('cn-inhouse');
});
it('should return "oversea-release" when in production, overseas, and is release version', () => {
vi.stubGlobal('IS_PROD', true); // 设置为生产环境
vi.stubGlobal('IS_OVERSEA', true); // 是海外
vi.stubGlobal('IS_RELEASE_VERSION', true); // 是发布版本
vi.stubGlobal('IS_PROD', true); // Set to production environment
vi.stubGlobal('IS_OVERSEA', true); // Is overseas
vi.stubGlobal('IS_RELEASE_VERSION', true); // Is the release version
const env = getEnv();
expect(env).toBe('oversea-release');
});
it('should return "oversea-inhouse" when in production, overseas, and is not release version', () => {
vi.stubGlobal('IS_PROD', true); // 设置为生产环境
vi.stubGlobal('IS_OVERSEA', true); // 是海外
vi.stubGlobal('IS_RELEASE_VERSION', false); // 不是发布版本
vi.stubGlobal('IS_PROD', true); // Set to production environment
vi.stubGlobal('IS_OVERSEA', true); // Is overseas
vi.stubGlobal('IS_RELEASE_VERSION', false); // Not the release version
const env = getEnv();
expect(env).toBe('oversea-inhouse');
});