Skip to content

Commit 8930220

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

File tree

3 files changed

+10
-25
lines changed

3 files changed

+10
-25
lines changed

scripts/postinstall

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@ const topsites = require('top-sites')
99

1010
const domains = [
1111
[['domain', 'abc.net.au']],
12-
[['domain', 'x.com']],
1312
[['domainWithoutSuffix', 'apple']],
1413
[['domainWithoutSuffix', 'arxiv']],
1514
[['domainWithoutSuffix', 'bbc']],
@@ -48,7 +47,6 @@ const domains = [
4847
[['domainWithoutSuffix', 'theguardian']],
4948
[['domainWithoutSuffix', 'theverge']],
5049
[['domainWithoutSuffix', 'tumblr']],
51-
[['domainWithoutSuffix', 'twitter']],
5250
[['domainWithoutSuffix', 'vimeo']],
5351
[['domainWithoutSuffix', 'wikipedia']],
5452
[['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)