mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-19 11:01:15 +00:00
fix(GitHub Node): Tolerate trailing slash in file path (#15517)
This commit is contained in:
@@ -6,6 +6,7 @@ import {
|
||||
fuzzyCompare,
|
||||
getResolvables,
|
||||
keysToLowercase,
|
||||
removeTrailingSlash,
|
||||
shuffleArray,
|
||||
sortItemKeysByPriorityList,
|
||||
wrapData,
|
||||
@@ -312,3 +313,13 @@ describe('sortItemKeysByPriorityList', () => {
|
||||
expect(Object.keys(result[0].json)).toEqual(['a', 'b', 'd']);
|
||||
});
|
||||
});
|
||||
|
||||
describe('removeTrailingSlash', () => {
|
||||
it('removes trailing slash', () => {
|
||||
expect(removeTrailingSlash('https://example.com/')).toBe('https://example.com');
|
||||
});
|
||||
|
||||
it('does not change a URL without trailing slash', () => {
|
||||
expect(removeTrailingSlash('https://example.com')).toBe('https://example.com');
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user