remove unused function
This commit is contained in:
@@ -49,5 +49,3 @@ export const getUmbracoFieldSnippet = (field: string, defaultValue: string | nul
|
||||
|
||||
return value;
|
||||
};
|
||||
|
||||
export * from './parent-path-from-server-path.function.js';
|
||||
|
||||
@@ -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;
|
||||
});
|
||||
});
|
||||
@@ -1,4 +0,0 @@
|
||||
export const getParentPathFromServerPath = (serverPath: string): string | null => {
|
||||
const parentPath = serverPath.substring(0, serverPath.lastIndexOf('/'));
|
||||
return parentPath || null;
|
||||
};
|
||||
Reference in New Issue
Block a user