From a46ccf72cef30eccf4cb3f9cdea9c461bb44f8b2 Mon Sep 17 00:00:00 2001 From: Caleb Mabry Date: Fri, 15 Jul 2022 00:44:10 -0400 Subject: Resolving issue with name display and encoding issue --- webAO/utils/__tests__/paths.test.ts | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 webAO/utils/__tests__/paths.test.ts (limited to 'webAO/utils/__tests__') diff --git a/webAO/utils/__tests__/paths.test.ts b/webAO/utils/__tests__/paths.test.ts new file mode 100644 index 0000000..4f41d09 --- /dev/null +++ b/webAO/utils/__tests__/paths.test.ts @@ -0,0 +1,13 @@ +import {getFilenameFromPath} from '../paths' +jest.mock('../fileExists') + +describe('getFilenameFromPath', () => { + const EXAMPLE_PATH = "localhost/stoneddiscord/assets.png" + it('Should get the last value from a path', async () => { + const actual = getFilenameFromPath(EXAMPLE_PATH); + const expected = 'assets.png'; + expect(actual).toBe(expected); + }); +}) + + -- cgit