Skip to content

Commit

Permalink
[WIP] fix: Special characters
Browse files Browse the repository at this point in the history
  • Loading branch information
Gordey Doronin committed Apr 20, 2021
1 parent f1f8d01 commit fd73b86
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions test/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -205,6 +205,16 @@ describe('github-url-to-object', function () {
assert.equal(obj.branch, '2.1')
})

it('resolves URLS for branches containing special characters', function () {
var obj = gh('https://github.com/zeke/outlet/tree/%3D%40')
assert.equal(obj.branch, '=@')
})

it('resolves URLS for branches containing special characters following after normal one', function () {
var obj = gh('https://github.com/zeke/outlet/tree/v%3D%40')
assert.equal(obj.branch, 'v=@')
})

it('resolves blob-style URLS for branches other than master', function () {
var obj = gh('https://github.com/zeke/ord/blob/new-style/.gitignore')
assert.equal(obj.branch, 'new-style')
Expand Down

0 comments on commit fd73b86

Please # to comment.