Skip to content

Commit

Permalink
test(nuxt-ripple): ✅ fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
waitingallday committed Oct 17, 2023
1 parent b2eb2fd commit 4dc9358
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ describe('sidebarSocialShareMapping', () => {
it('should return the default list of networks when social share display is switched on', () => {
expect(sidebarSocialShareMapping(parsedData)).toEqual([
'Facebook',
'Twitter',
'X',
'LinkedIn'
])
})
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,14 @@ describe('getIconForUrl', () => {
expect(getIconForUrl('https://linkedin.com/')).toBe('icon-linkedin')
})

it('returns icon-twitter when passed twitter.com link', () => {
expect(getIconForUrl('https://www.twitter.com/')).toBe('icon-twitter')
expect(getIconForUrl('https://twitter.com/')).toBe('icon-twitter')
it('returns icon-x when passed twitter.com link', () => {
expect(getIconForUrl('https://www.twitter.com/')).toBe('icon-x')
expect(getIconForUrl('https://twitter.com/')).toBe('icon-x')
})

it('returns icon-x when passed x.com link', () => {
expect(getIconForUrl('https://www.x.com/')).toBe('icon-x')
expect(getIconForUrl('https://x.com/')).toBe('icon-x')
})

it('returns icon-youtube when passed youtube.com link', () => {
Expand Down Expand Up @@ -122,7 +127,7 @@ describe('processSiteSocialLinks', () => {
id: 'social_link-5',
text: 'Twitter',
url: 'https://www.twitter.com/',
icon: 'icon-twitter',
icon: 'icon-x',
iconColour: 'currentColor'
},
{
Expand Down

0 comments on commit 4dc9358

Please sign in to comment.