You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat(Twitter): Add support for Twitter timelines (#120)
* Solving #97
* Update tests
* Update src/transformers/Twitter.js
(for the sake of consistency)
Co-authored-by: Michaël De Boey <[email protected]>
* Update src/__tests__/transformers/Twitter.js
As far as we know, this can't be created
Co-authored-by: Michaël De Boey <[email protected]>
* Update src/__tests__/transformers/Twitter.js
This too, is not possible.
Co-authored-by: Michaël De Boey <[email protected]>
* Update src/__tests__/transformers/__fixtures__/Twitter.md
This too, is not possible.
Co-authored-by: Michaël De Boey <[email protected]>
Co-authored-by: Agastya Chandrakant <[email protected]>
Co-authored-by: Michaël De Boey <[email protected]>
@@ -111,10 +125,25 @@ test('Gets the correct Twitter moment link', async () => {
111
125
);
112
126
});
113
127
128
+
test('Gets the correct Twitter timeline link',async()=>{
129
+
mockFetch(
130
+
`<a class="twitter-timeline-mocked-fetch-transformer" href="https://twitter.com/wesbos/timelines/1189618481672667136">🔥 Hot Tips from Wes Bos - Curated tweets by wesbos</a>`
`"<a class=\\"twitter-timeline-mocked-fetch-transformer\\" href=\\"https://twitter.com/wesbos/timelines/1189618481672667136\\">🔥 Hot Tips from Wes Bos - Curated tweets by wesbos</a>"`
139
+
);
140
+
});
141
+
114
142
test('Plugin can transform Twitter links',async()=>{
115
143
mockFetch(
116
144
`<blockquote class="twitter-tweet-mocked-fetch-plugin"><p lang="en" dir="ltr">example</p>— Kent C. Dodds (@kentcdodds) <a href="https://twitter.com/kentcdodds/status/1078755736455278592">December 28, 2018</a></blockquote>`,
`<a class="twitter-timeline-mocked-fetch-plugin" href="https://twitter.com/wesbos/timelines/1189618481672667136">🔥 Hot Tips from Wes Bos - Curated tweets by wesbos</a>`
<a class=\\"twitter-timeline-mocked-fetch-plugin\\" href=\\"https://twitter.com/wesbos/timelines/1189618481672667136\\">🔥 Hot Tips from Wes Bos - Curated tweets by wesbos</a>
182
+
183
+
<a class=\\"twitter-timeline-mocked-fetch-plugin\\" href=\\"https://twitter.com/wesbos/timelines/1189618481672667136\\">🔥 Hot Tips from Wes Bos - Curated tweets by wesbos</a>
0 commit comments