We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 9bb261d commit fdebba6Copy full SHA for fdebba6
test/web/astier/index.js
@@ -0,0 +1,19 @@
1
+'use strict'
2
+
3
+const {load: loadJSON} = require('json-future')
4
+const {resolve} = require('path')
5
+const {promisify} = require('util')
6
+const should = require('should')
7
+const fs = require('fs')
8
9
+const getMetaData = require('../../..')
10
+const readFile = promisify(fs.readFile)
11
12
+const url = 'https://anisse.astier.eu'
13
14
+it('astier', async () => {
15
+ const html = await readFile(resolve(__dirname, 'input.html'))
16
+ const json = await loadJSON(resolve(__dirname, 'output.json'))
17
+ const metadata = await getMetaData({html, url})
18
+ should(metadata).be.eql(json)
19
+})
0 commit comments