Skip to content

Commit 9d16b99

Browse files
committed
chore: remove twitter
1 parent 7519d19 commit 9d16b99

File tree

3 files changed

+10
-24
lines changed

3 files changed

+10
-24
lines changed

scripts/postinstall

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,6 @@ const domains = [
4848
[['domainWithoutSuffix', 'theguardian']],
4949
[['domainWithoutSuffix', 'theverge']],
5050
[['domainWithoutSuffix', 'tumblr']],
51-
[['domainWithoutSuffix', 'twitter']],
5251
[['domainWithoutSuffix', 'vimeo']],
5352
[['domainWithoutSuffix', 'wikipedia']],
5453
[['domainWithoutSuffix', 'wordpress']],

test/is-fetch-mode.js

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,8 @@ test('true', t => {
1010
'https://www.abc.net.au/news/2023-06-14/idpwd-2023-calling-all-budding-storytellers-with-disability/102388090'
1111
)
1212
)
13-
t.true(
14-
isFetchMode('https://twitter.com/Kikobeats/status/1741205717636264436')
15-
)
13+
})
14+
15+
test('false', t => {
16+
t.false(isFetchMode('https://x.com/Kikobeats/status/1741205717636264436'))
1617
})

test/mode.js

Lines changed: 6 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -20,26 +20,12 @@ test('`{ prerender: false }`', async t => {
2020
})
2121

2222
test("`{ prerender: 'auto' }`", async t => {
23-
{
24-
const url = 'https://google.com'
25-
const { stats } = await getHTML(url, {
26-
getBrowserless,
27-
puppeteerOpts: { adblock: false }
28-
})
29-
t.is(stats.mode, 'fetch')
30-
}
31-
{
32-
const url = 'https://twitter.com/Kikobeats/status/1741205717636264436'
33-
const { html, stats } = await getHTML(url, {
34-
headers: {
35-
'user-agent': 'Slackbot 1.0 (+https://api.slack.com/robots)'
36-
},
37-
getBrowserless,
38-
puppeteerOpts: { adblock: false }
39-
})
40-
t.true(html.includes('og:title'))
41-
t.is(stats.mode, 'fetch')
42-
}
23+
const url = 'https://google.com'
24+
const { stats } = await getHTML(url, {
25+
getBrowserless,
26+
puppeteerOpts: { adblock: false }
27+
})
28+
t.is(stats.mode, 'fetch')
4329
})
4430

4531
test.skip('prerender error fallback into fetch mode', async t => {

0 commit comments

Comments
 (0)