tldts-tests 7.4.22 → 7.4.24
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/src/tldts-tests.js +24 -0
- package/dist/cjs/src/tldts-tests.js.map +1 -1
- package/dist/cjs/tsconfig.tsbuildinfo +1 -1
- package/dist/es6/src/tldts-tests.js +24 -0
- package/dist/es6/src/tldts-tests.js.map +1 -1
- package/dist/es6/tsconfig.bundle.tsbuildinfo +1 -1
- package/package.json +3 -3
- package/src/tldts-tests.ts +33 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "tldts-tests",
|
|
3
|
-
"version": "7.4.
|
|
3
|
+
"version": "7.4.24",
|
|
4
4
|
"description": "tests for different tldts implementations",
|
|
5
5
|
"author": {
|
|
6
6
|
"name": "Rémi Berson"
|
|
@@ -52,7 +52,7 @@
|
|
|
52
52
|
"devDependencies": {
|
|
53
53
|
"@types/node": "^26.6.2",
|
|
54
54
|
"rimraf": "^6.1.2",
|
|
55
|
-
"tldts-utils": "^7.4.
|
|
55
|
+
"tldts-utils": "^7.4.24",
|
|
56
56
|
"typescript": "^6.0.3"
|
|
57
57
|
},
|
|
58
58
|
"dependencies": {
|
|
@@ -61,5 +61,5 @@
|
|
|
61
61
|
"chai": "^6.2.2",
|
|
62
62
|
"mocha": "^12.0.2"
|
|
63
63
|
},
|
|
64
|
-
"gitHead": "
|
|
64
|
+
"gitHead": "8102cb2d1712f46e7d7851f136a8d2c07268a098"
|
|
65
65
|
}
|
package/src/tldts-tests.ts
CHANGED
|
@@ -638,6 +638,25 @@ export default function test(
|
|
|
638
638
|
'co.uk',
|
|
639
639
|
);
|
|
640
640
|
});
|
|
641
|
+
|
|
642
|
+
// `*.futurecms.at` matches `ex.futurecms.at`, although `ex` is also a
|
|
643
|
+
// label of the longer `*.ex.futurecms.at` rule.
|
|
644
|
+
it('should match a wildcard rule on a label shared with a longer rule', () => {
|
|
645
|
+
for (const hostname of [
|
|
646
|
+
'ex.futurecms.at',
|
|
647
|
+
'www.ex.futurecms.at',
|
|
648
|
+
'in.futurecms.at',
|
|
649
|
+
'mtls.run.app',
|
|
650
|
+
'oci.customer-oci.com',
|
|
651
|
+
'r.cloud.int.apple',
|
|
652
|
+
'ap-north-1.r.cloud.int.apple',
|
|
653
|
+
]) {
|
|
654
|
+
expect(getPublicSuffix(hostname)).to.equal(hostname);
|
|
655
|
+
}
|
|
656
|
+
expect(
|
|
657
|
+
tldts.parse('ex.futurecms.at', { allowPrivateDomains: true }),
|
|
658
|
+
).to.include({ domain: null, isIcann: false, isPrivate: true });
|
|
659
|
+
});
|
|
641
660
|
});
|
|
642
661
|
}
|
|
643
662
|
|
|
@@ -679,6 +698,11 @@ export default function test(
|
|
|
679
698
|
it('should return co.uk if google.co.uk', () => {
|
|
680
699
|
expect(getPublicSuffix('google.co.uk')).to.equal('co.uk');
|
|
681
700
|
});
|
|
701
|
+
|
|
702
|
+
it('should ignore private wildcard rules', () => {
|
|
703
|
+
expect(getPublicSuffix('ex.futurecms.at')).to.equal('at');
|
|
704
|
+
expect(getPublicSuffix('www.ex.futurecms.at')).to.equal('at');
|
|
705
|
+
});
|
|
682
706
|
});
|
|
683
707
|
|
|
684
708
|
if (includePrivate) {
|
|
@@ -705,6 +729,15 @@ export default function test(
|
|
|
705
729
|
it('should return co.uk if google.co.uk', () => {
|
|
706
730
|
expect(getPublicSuffix('google.co.uk')).to.equal('uk');
|
|
707
731
|
});
|
|
732
|
+
|
|
733
|
+
it('should match a private wildcard rule on a shared label', () => {
|
|
734
|
+
expect(getPublicSuffix('ex.futurecms.at')).to.equal(
|
|
735
|
+
'ex.futurecms.at',
|
|
736
|
+
);
|
|
737
|
+
expect(getPublicSuffix('www.ex.futurecms.at')).to.equal(
|
|
738
|
+
'www.ex.futurecms.at',
|
|
739
|
+
);
|
|
740
|
+
});
|
|
708
741
|
});
|
|
709
742
|
}
|
|
710
743
|
});
|