More test cases
This commit is contained in:
parent
019d1d2e62
commit
1557d2cca9
@ -21,4 +21,12 @@ describe('safe path', () => {
|
|||||||
it('accept names starting with `..`', () => {
|
it('accept names starting with `..`', () => {
|
||||||
expect(safePath('./uplodas', '..foobar')).toBe(true);
|
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);
|
||||||
|
});
|
||||||
});
|
});
|
||||||
|
Reference in New Issue
Block a user