diff --git a/packages/phishing/src/index.spec.ts b/packages/phishing/src/index.spec.ts index b08a67d97..a72e97cb1 100644 --- a/packages/phishing/src/index.spec.ts +++ b/packages/phishing/src/index.spec.ts @@ -117,4 +117,28 @@ describe('check additions', (): void => { expect(invalids).toEqual([]); }); + + it('has no urls starting with www. (domain-only inclusions)', (): void => { + const invalids = all.deny.filter((u) => + u.startsWith('www.') + ); + + expect(invalids).toEqual([]); + }); + + it('has no duplicate entries', (): void => { + const checks: string[] = []; + + const dupes = all.deny.reduce((dupes, url) => { + if (!checks.includes(url)) { + checks.push(url); + } else { + dupes.push(url); + } + + return dupes; + }, []); + + expect(dupes).toEqual([]); + }); });