Revert "Move settings to public/svgld-settings.js"
This reverts commit 2cf56632155f5378c8819991b1b42ab135cbe384.
This commit is contained in:
parent
fff0645045
commit
d368641200
12 changed files with 27 additions and 26 deletions
|
@ -1,6 +1,5 @@
|
|||
/* eslint-disable @typescript-eslint/naming-convention */
|
||||
import { describe, it, expect } from 'vitest';
|
||||
import { API_FETCH_URL } from '../../../public/svgld-settings';
|
||||
import { AddMethod } from '../../Enums/AddMethod';
|
||||
import { Orientation } from '../../Enums/Orientation';
|
||||
import { Position } from '../../Enums/Position';
|
||||
|
@ -21,9 +20,9 @@ const CHARP_WEB_API_RESOURCE_URL = 'SVGLD';
|
|||
const CSHARP_WEB_API_URL = CSHARP_WEB_API_BASE_URL + CHARP_WEB_API_RESOURCE_URL + '/';
|
||||
|
||||
// TODO: Migrate this test to SVGLDWebAPI rather than using test-server/
|
||||
describe.concurrent('Test server test', async() => {
|
||||
describe.concurrent('Test server test', () => {
|
||||
it('Load environment', () => {
|
||||
const url = API_FETCH_URL;
|
||||
const url = import.meta.env.VITE_API_FETCH_URL;
|
||||
expect(url).toBe('http://localhost:5000');
|
||||
});
|
||||
|
||||
|
|
|
@ -1,4 +1,3 @@
|
|||
import { API_FETCH_URL, API_SET_CONTAINER_LIST_URL } from '../../../public/svgld-settings';
|
||||
import { IConfiguration } from '../../Interfaces/IConfiguration';
|
||||
import { ISetContainerListRequest } from '../../Interfaces/ISetContainerListRequest';
|
||||
import { ISetContainerListResponse } from '../../Interfaces/ISetContainerListResponse';
|
||||
|
@ -9,7 +8,7 @@ import { GetCircularReplacerToDotnet } from '../../utils/saveload';
|
|||
* @returns {Configation} The model of the configuration for the application
|
||||
*/
|
||||
export async function FetchConfiguration(): Promise<IConfiguration> {
|
||||
const url = API_FETCH_URL;
|
||||
const url = import.meta.env.VITE_API_FETCH_URL;
|
||||
// The test library cannot use the Fetch API
|
||||
// @ts-expect-error
|
||||
// eslint-disable-next-line @typescript-eslint/strict-boolean-expressions
|
||||
|
@ -35,7 +34,7 @@ export async function FetchConfiguration(): Promise<IConfiguration> {
|
|||
}
|
||||
|
||||
export async function SetContainerList(request: ISetContainerListRequest): Promise<ISetContainerListResponse> {
|
||||
const url = API_SET_CONTAINER_LIST_URL;
|
||||
const url = import.meta.env.VITE_API_SET_CONTAINER_LIST_URL;
|
||||
const dataParsed = JSON.stringify(request, GetCircularReplacerToDotnet());
|
||||
// The test library cannot use the Fetch API
|
||||
// @ts-expect-error
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue