Skip to content

Commit

Permalink
test(data): Adds test cases for subdomains with underscores
Browse files Browse the repository at this point in the history
  • Loading branch information
lupomontero committed Nov 22, 2024
1 parent 1dce5f2 commit a52c3c8
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 0 deletions.
1 change: 1 addition & 0 deletions test/data/is-valid.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,5 @@ export default [
{ value: 'pages.github.io', expected: true },
{ value: 'gov.uk', expected: false },
{ value: 'data.gov.uk', expected: true },
{ value: '_jabber._tcp.gmail.com', expected: true },
];
3 changes: 3 additions & 0 deletions test/data/mozilla.js
Original file line number Diff line number Diff line change
Expand Up @@ -103,4 +103,7 @@ checkPublicSuffix('www.xn--85x722f.xn--fiqs8s', 'xn--85x722f.xn--fiqs8s');
checkPublicSuffix('shishi.xn--fiqs8s', 'shishi.xn--fiqs8s');
checkPublicSuffix('xn--fiqs8s', null);

// https://github.com/lupomontero/psl/pull/46
checkPublicSuffix('_jabber._tcp.gmail.com', 'gmail.com');

export default testData;
11 changes: 11 additions & 0 deletions test/data/parse.js
Original file line number Diff line number Diff line change
Expand Up @@ -201,4 +201,15 @@ export default [
listed: true,
},
},
{
value: '_jabber._tcp.gmail.com',
expected: {
input: '_jabber._tcp.gmail.com',
tld: 'com',
sld: 'gmail',
domain: 'gmail.com',
subdomain: '_jabber._tcp',
listed: true,
},
},
];

0 comments on commit a52c3c8

Please sign in to comment.