@@ -13,10 +13,9 @@ const createMetascraper = (...args) =>
13
13
require ( 'metascraper' ) ( [ createMetascraperIframe ( ...args ) ] )
14
14
15
15
test ( 'provide `gotOpts`' , async t => {
16
- console . log ( 'running' )
17
16
const dnsCache = new CacheableLookup ( )
18
17
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'
20
19
const metascraper = createMetascraper ( { gotOpts : { dnsCache } } )
21
20
22
21
const metadataOne = await metascraper ( {
@@ -26,7 +25,7 @@ test('provide `gotOpts`', async t => {
26
25
} )
27
26
t . truthy ( metadataOne . iframe )
28
27
29
- t . is ( dnsCache . _cache . size , 2 )
28
+ t . is ( dnsCache . _cache . size , 1 )
30
29
31
30
const metadataTwo = await metascraper ( {
32
31
url,
@@ -35,7 +34,7 @@ test('provide `gotOpts`', async t => {
35
34
} )
36
35
37
36
t . truthy ( metadataTwo . iframe )
38
- t . is ( dnsCache . _cache . size , 2 )
37
+ t . is ( dnsCache . _cache . size , 1 )
39
38
} )
40
39
41
40
test ( 'provide `iframe`' , async t => {
@@ -55,7 +54,7 @@ commonProviders.forEach(url => {
55
54
56
55
test ( 'get iframe from markup' , async t => {
57
56
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'
59
58
const rules = [ createMetascraperIframe ( ) ]
60
59
const metascraper = createMetascraper ( rules )
61
60
const metadata = await metascraper ( { url, html } )
0 commit comments