remove unused function

This commit is contained in:
Mads Rasmussen
2024-01-13 20:35:21 +01:00
parent 6b3c742433
commit 3574906f1c
3 changed files with 0 additions and 21 deletions

View File

@@ -49,5 +49,3 @@ export const getUmbracoFieldSnippet = (field: string, defaultValue: string | nul
return value;
};
export * from './parent-path-from-server-path.function.js';

View File

@@ -1,15 +0,0 @@
import { expect } from '@open-wc/testing';
import { getParentPathFromServerPath } from './parent-path-from-server-path.function.js';
describe('parent-path-from-server-path', () => {
it('it returns the parent path of a nested server path', () => {
const path = 'Folder A/Folder AA/Folder AAA';
const expectedParentPath = 'Folder A/Folder AA';
expect(getParentPathFromServerPath(path)).to.equal(expectedParentPath);
});
it('it returns null of a root server path', () => {
const path = 'Folder A';
expect(getParentPathFromServerPath(path)).to.be.null;
});
});

View File

@@ -1,4 +0,0 @@
export const getParentPathFromServerPath = (serverPath: string): string | null => {
const parentPath = serverPath.substring(0, serverPath.lastIndexOf('/'));
return parentPath || null;
};