Skip to content

Commit

Permalink
added test 1
Browse files Browse the repository at this point in the history
  • Loading branch information
gouravmpk authored Dec 22, 2023
1 parent 2bb6de4 commit 7d2eb67
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/components/AddContentModal/utils/__tests__/index.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { LINK, TWITTER_HANDLE, TWITTER_SOURCE, WEB_PAGE, YOUTUBE_CHANNEL } from '~/constants'
import { AUDIO_VIDEO,LINK, TWITTER_HANDLE, TWITTER_SOURCE, WEB_PAGE, YOUTUBE_CHANNEL } from '~/constants'
import { extractNameFromLink, getInputType } from '..'

describe('youtubeRegex', () => {
Expand All @@ -22,6 +22,10 @@ describe('youtubeRegex', () => {
expect(getInputType('https://hahaha.com/i/spaces/1zqKVqwrVzlxB?s=20.mp3')).toBe(LINK)
})

it('should assert we can check for Twitter broadcast regex', () => {
expect(getInputType('https://twitter.com/i/broadcasts/1YqxoDbOqevKv')).toBe(AUDIO_VIDEO);
})

it('should assert we can check for generic url regex', async () => {
expect(getInputType('https://idkwhat.com/routeing/tou')).toBe(WEB_PAGE)
})
Expand Down

0 comments on commit 7d2eb67

Please sign in to comment.