From 1557d2cca9411c2a89da7995256ac720c238dd4c Mon Sep 17 00:00:00 2001 From: Valentin Brandl Date: Sat, 17 Aug 2024 15:38:23 +0200 Subject: [PATCH] More test cases --- src/index.test.ts | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/index.test.ts b/src/index.test.ts index b4831ce..dbc9154 100644 --- a/src/index.test.ts +++ b/src/index.test.ts @@ -21,4 +21,12 @@ describe('safe path', () => { it('accept names starting with `..`', () => { expect(safePath('./uplodas', '..foobar')).toBe(true); }); + + it('accept names ending with `..`', () => { + expect(safePath('./uplodas', 'foobar..')).toBe(true); + }); + + it('accept names starting and ending with `..`', () => { + expect(safePath('./uplodas', '..foobar..')).toBe(true); + }); });