Skip to content

Commit e699676

Browse files
committed
chore: write tests
add extra test case for uppercase on `Bit.ly`
1 parent 969d9f4 commit e699676

File tree

2 files changed

+51
-23
lines changed

2 files changed

+51
-23
lines changed

package-lock.json

Lines changed: 41 additions & 23 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

test/shared/util/validation.test.ts

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,11 @@ describe('Test whiteliste check', () => {
99
})
1010

1111
describe('Test blacklist check', () => {
12+
test('example GooGle.com url is not blacklisted', () => {
13+
const url = 'https://www.GooGle.com'
14+
expect(validation.isBlacklisted(url)).toBe(false)
15+
})
16+
1217
test('localstack url is not blacklisted', () => {
1318
const url = 'http://localhost:4566'
1419
expect(validation.isBlacklisted(url)).toBe(false)
@@ -18,6 +23,11 @@ describe('Test blacklist check', () => {
1823
const url = 'https://bit.ly/abc'
1924
expect(validation.isBlacklisted(url)).toBe(true)
2025
})
26+
27+
test('example Bit.Ly url is also blacklisted', () => {
28+
const url = 'https://Bit.Ly/abc'
29+
expect(validation.isBlacklisted(url)).toBe(true)
30+
})
2131
})
2232

2333
describe('Test https check', () => {

0 commit comments

Comments
 (0)