Skip to content

Commit 00ca54b

Browse files
committed
test: update genially fixture
1 parent 2f4e0b4 commit 00ca54b

File tree

3 files changed

+357
-79
lines changed

3 files changed

+357
-79
lines changed

packages/metascraper-iframe/test/fixtures/genially.html

Lines changed: 352 additions & 73 deletions
Large diffs are not rendered by default.

packages/metascraper-iframe/test/index.js

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,9 @@ const createMetascraper = (...args) =>
1313
require('metascraper')([createMetascraperIframe(...args)])
1414

1515
test('provide `gotOpts`', async t => {
16-
console.log('running')
1716
const dnsCache = new CacheableLookup()
1817
const html = await readFile(resolve(__dirname, 'fixtures/genially.html'))
19-
const url = 'https://view.genial.ly/5dc53cfa759d2a0f4c7db5f4'
18+
const url = 'https://view.genially.com/5dc53cfa759d2a0f4c7db5f4'
2019
const metascraper = createMetascraper({ gotOpts: { dnsCache } })
2120

2221
const metadataOne = await metascraper({
@@ -26,7 +25,7 @@ test('provide `gotOpts`', async t => {
2625
})
2726
t.truthy(metadataOne.iframe)
2827

29-
t.is(dnsCache._cache.size, 2)
28+
t.is(dnsCache._cache.size, 1)
3029

3130
const metadataTwo = await metascraper({
3231
url,
@@ -35,7 +34,7 @@ test('provide `gotOpts`', async t => {
3534
})
3635

3736
t.truthy(metadataTwo.iframe)
38-
t.is(dnsCache._cache.size, 2)
37+
t.is(dnsCache._cache.size, 1)
3938
})
4039

4140
test('provide `iframe`', async t => {
@@ -55,7 +54,7 @@ commonProviders.forEach(url => {
5554

5655
test('get iframe from markup', async t => {
5756
const html = await readFile(resolve(__dirname, 'fixtures/genially.html'))
58-
const url = 'https://view.genial.ly/5dc53cfa759d2a0f4c7db5f4'
57+
const url = 'https://view.genially.com/5dc53cfa759d2a0f4c7db5f4'
5958
const rules = [createMetascraperIframe()]
6059
const metascraper = createMetascraper(rules)
6160
const metadata = await metascraper({ url, html })

packages/metascraper-iframe/test/test.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ test('false', t => {
2424

2525
test('from markup', async t => {
2626
const html = await readFile(resolve(__dirname, 'fixtures/genially.html'))
27-
const url = 'https://view.genial.ly/5dc53cfa759d2a0f4c7db5f4'
27+
const url = 'https://view.genially.com/5dc53cfa759d2a0f4c7db5f4'
2828
const htmlDom = cheerio.load(html)
2929
t.true(validator(url, htmlDom))
3030
})

0 commit comments

Comments
 (0)