More test cases

This commit is contained in:
Steve Faulkner 2020-09-29 17:31:58 -05:00
parent aa369760ad
commit b2c24fab4f

View File

@ -16,6 +16,8 @@ test.each`
${"https://main.documentdb.ext.microsoftazure.de"} | ${false}
${"https://random.domain"} | ${true}
${"https://malicious.cloudapp.azure.com"} | ${true}
${"https://maliciousazure.com"} | ${true}
${"https://maliciousportalsazure.com"} | ${true}
`("returns $expected when called with $domain", ({ domain, expected }) => {
expect(isInvalidParentFrameOrigin({ origin: domain } as MessageEvent)).toBe(expected);
});