Skip to content

Commit

Permalink
test: fix test
Browse files Browse the repository at this point in the history
  • Loading branch information
Kikobeats committed May 5, 2019
1 parent 85bbd84 commit 21c7e8a
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions packages/metascraper/test/unit/interface.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

const should = require('should')

const metascraper = require('../..')([])
const metascraper = require('../..')([require('metascraper-title')()])

it('url is required', async () => {
try {
Expand Down Expand Up @@ -49,11 +49,13 @@ it('escape is enabled by default', async () => {
`

const metadata = await metascraper({
html: html,
html,
url: 'http://127.0.0.1:8080'
})

should(metadata.title).be.equal('<script src=‘http://127.0.0.1:8080/malware.js’></script>')
should(metadata.title).be.equal(
'&lt;script src=‘http://127.0.0.1:8080/malware.js’&gt;&lt;/script&gt;'
)
})

it('load extra rules', async () => {
Expand Down

0 comments on commit 21c7e8a

Please sign in to comment.