Skip to content

Commit

Permalink
Add tests for custom domains
Browse files Browse the repository at this point in the history
  • Loading branch information
Arttse committed Mar 8, 2019
1 parent 62077cd commit 419f13f
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 0 deletions.
5 changes: 5 additions & 0 deletions test/cyrillic-ascii/other.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,3 +20,8 @@ test('protocols without colon-slash-slash', t => {
t.false(m('mailto:[email protected]'))
t.false(m('tel:1234567890'))
})

test('custom domains', t => {
t.true(m('xn--80aswg.xn--p1ai/%D0%B2%D0%BD%D1%83/%D1%82%D1%80%D0%B8', []))
t.false(m('xn--80aswg.xn--p1ai/%D0%B2%D0%BD%D1%83/%D1%82%D1%80%D0%B8', ['рф']))
})
5 changes: 5 additions & 0 deletions test/cyrillic-unicode/other.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,3 +17,8 @@ test('protocols without colon-slash-slash', t => {
t.false(m('mailto:помощь@сайт.рф'))
t.false(m('tel:1234567890'))
})

test('custom domains', t => {
t.true(m('сайт.рф/вну/три', []))
t.false(m('сайт.рф/вну/три', ['рф']))
})
5 changes: 5 additions & 0 deletions test/eng/other.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,3 +19,8 @@ test('protocols without colon-slash-slash', t => {
t.false(m('mailto:[email protected]'))
t.false(m('tel:1234567890'))
})

test('custom domains', t => {
t.true(m('site.com/in/side', []))
t.false(m('site.com/in/side', ['com']))
})

0 comments on commit 419f13f

Please sign in to comment.