-
Notifications
You must be signed in to change notification settings - Fork 60
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' into feat/phrases
- Loading branch information
Showing
11 changed files
with
202 additions
and
170 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
assets/chat/js/formatters.test.js → ...tters/AmazonAssociatesTagInjector.test.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
import UrlFormatter from './UrlFormatter'; | ||
|
||
const urlFormatter = new UrlFormatter(); | ||
|
||
describe('Normalizing URLs', () => { | ||
test('Remove the query string from a tweet URL', () => { | ||
expect( | ||
urlFormatter.normalizeUrl('https://twitter.com/jack/status/20?lang=en') | ||
).toBe('https://twitter.com/jack/status/20'); | ||
}); | ||
|
||
test('Remove the query string from a xeet URL', () => { | ||
expect( | ||
urlFormatter.normalizeUrl('https://x.com/jack/status/20?lang=en') | ||
).toBe('https://x.com/jack/status/20'); | ||
}); | ||
|
||
test("Don't modify a URL to a tweet that doesn't contain a query string", () => { | ||
expect(urlFormatter.normalizeUrl('https://x.com/jack/status/20')).toBe( | ||
'https://x.com/jack/status/20' | ||
); | ||
}); | ||
|
||
test("Don't modify a URL that isn't Twitter or X", () => { | ||
expect( | ||
urlFormatter.normalizeUrl('https://www.twitch.tv/search?term=vtuber') | ||
).toBe('https://www.twitch.tv/search?term=vtuber'); | ||
}); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.