Skip to content

Commit

Permalink
Fix lint errors
Browse files Browse the repository at this point in the history
  • Loading branch information
Tzal3x committed Jul 20, 2024
1 parent 11a63ab commit edac936
Showing 1 changed file with 10 additions and 7 deletions.
17 changes: 10 additions & 7 deletions portal/unit_tests/domain_parsing.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,17 +6,20 @@ const testCases: [string, string][] = [
['https://suinsname.localhost:8080', 'localhost'],
['https://suinsname.subname.localhost:8080', 'localhost'],
['https://flatland.walrus.site/', 'walrus.site'],
['https://4snh0c0o7quicfzokqpsmuchtgitnukme1q680o1s1nfn325sr.walrus.site/', 'walrus.site'],
['https://4snh0c0o7quicfzokqpsmuchtgitnukme1q680o1s1nfn325sr.portalname.co.uk/', 'portalname.co.uk'],
['https://4snh0c0o7quicfzokqpsmuchtgitnukme1q680o1s1nfn325sr.walrus.site/',
'walrus.site'],
['https://4snh0c0o7quicfzokqpsmuchtgitnukme1q680o1s1nfn325sr.portalname.co.uk/',
'portalname.co.uk'],
['https://suinsname.subname.portalname.co.uk/', 'portalname.co.uk'],
['https://suinsname.subname.anothersubname.portalname.co.uk/', 'portalname.co.uk']
['https://suinsname.subname.anothersubname.portalname.co.uk/',
'portalname.co.uk']
]

describe('getDomain', () => {
testCases.forEach(([input, expected]) => {
test(`${input} -> ${expected}`, () => {
const domain = getDomain(input)
expect(domain).toEqual(expected)
test(`${input} -> ${expected}`, () => {
const domain = getDomain(input)
expect(domain).toEqual(expected)
})
})
})
})

0 comments on commit edac936

Please sign in to comment.