website refactor
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
import { describe, it, expect, beforeEach, afterEach, vi } from 'vitest';
|
||||
import { FeatureFlagService, MockFeatureFlagService, mockFeatureFlags } from './FeatureFlagService';
|
||||
import * as apiBaseUrl from '../config/apiBaseUrl';
|
||||
|
||||
describe('FeatureFlagService', () => {
|
||||
describe('fromAPI()', () => {
|
||||
@@ -54,7 +55,7 @@ describe('FeatureFlagService', () => {
|
||||
});
|
||||
|
||||
it('should use default localhost URL when NEXT_PUBLIC_API_BASE_URL is not set', async () => {
|
||||
delete process.env.NEXT_PUBLIC_API_BASE_URL;
|
||||
vi.spyOn(apiBaseUrl, 'getWebsiteApiBaseUrl').mockReturnValue('http://localhost:3001');
|
||||
|
||||
fetchMock.mockResolvedValueOnce({
|
||||
ok: true,
|
||||
|
||||
Reference in New Issue
Block a user