about summary refs log tree commit diff
path: root/__tests__
diff options
context:
space:
mode:
authorEric Bailey <git@esb.lol>2023-11-22 17:20:35 -0600
committerGitHub <noreply@github.com>2023-11-22 17:20:35 -0600
commitedf3114e476aef5da67ca76b4636ac3cfbcb26d8 (patch)
tree2cdd41ad5a11aae5cf2c49bddac58c1aaae9a5af /__tests__
parentec819f06cecca6a20b4c8c9cac3f4727d4464a04 (diff)
downloadvoidsky-edf3114e476aef5da67ca76b4636ac3cfbcb26d8.tar.zst
Fixes 1731, compare URLs case-insensitive (#1980)
Diffstat (limited to '__tests__')
-rw-r--r--__tests__/lib/strings/url-helpers.test.ts7
1 files changed, 7 insertions, 0 deletions
diff --git a/__tests__/lib/strings/url-helpers.test.ts b/__tests__/lib/strings/url-helpers.test.ts
index 8bb52ed40..6ac31aeb6 100644
--- a/__tests__/lib/strings/url-helpers.test.ts
+++ b/__tests__/lib/strings/url-helpers.test.ts
@@ -1,3 +1,5 @@
+import {it, describe, expect} from '@jest/globals'
+
 import {
   linkRequiresWarning,
   isPossiblyAUrl,
@@ -6,6 +8,7 @@ import {
 
 describe('linkRequiresWarning', () => {
   type Case = [string, string, boolean]
+
   const cases: Case[] = [
     ['http://example.com', 'http://example.com', false],
     ['http://example.com', 'example.com', false],
@@ -64,6 +67,10 @@ describe('linkRequiresWarning', () => {
     ['http://bsky.app/', 'https://google.com', true],
     ['https://bsky.app/', 'https://google.com', true],
 
+    // case insensitive
+    ['https://Example.com', 'example.com', false],
+    ['https://example.com', 'Example.com', false],
+
     // bad uri inputs, default to true
     ['', '', true],
     ['example.com', 'example.com', true],