diff options
author | Alan Pearce | 2017-07-02 15:30:20 +0200 |
---|---|---|
committer | Alan Pearce | 2017-07-02 15:30:20 +0200 |
commit | b7bf162e6c3bc834097e65936704e3eac59eb4bd (patch) | |
tree | 9f080d9c67d6ee17a506e5ab52761f22b649137c /test/snapshots | |
parent | 2d931962b74fe06c1bfbc2454fa166d24e8e2f59 (diff) | |
download | homestead-b7bf162e6c3bc834097e65936704e3eac59eb4bd.tar.lz homestead-b7bf162e6c3bc834097e65936704e3eac59eb4bd.tar.zst homestead-b7bf162e6c3bc834097e65936704e3eac59eb4bd.zip |
feat: Use microformats classes
Add snapshot-based tests to ensure microformats data can be extracted correctly.
Diffstat (limited to 'test/snapshots')
-rw-r--r-- | test/snapshots/app.test.js.md | 163 | ||||
-rw-r--r-- | test/snapshots/app.test.js.snap | bin | 0 -> 1236 bytes |
2 files changed, 163 insertions, 0 deletions
diff --git a/test/snapshots/app.test.js.md b/test/snapshots/app.test.js.md new file mode 100644 index 0000000..99811f9 --- /dev/null +++ b/test/snapshots/app.test.js.md @@ -0,0 +1,163 @@ +# Snapshot report for `test/app.test.js` + +The actual snapshot is saved in `app.test.js.snap`. + +Generated by [AVA](https://ava.li). + +## homepage + +> should contain relevant microformats data + + { + items: [ + { + properties: { + name: [ + 'John Doe', + ], + photo: [ + '/static/johndoe.jpg', + ], + url: [ + '/', + ], + }, + type: [ + 'h-card', + ], + }, + { + children: [ + { + properties: { + name: [ + 'This is a test', + ], + published: [ + '2017-01-01T00:00:00.000Z', + ], + url: [ + '/post/testfile', + ], + }, + type: [ + 'h-entry', + ], + value: 'This is a test Sunday, January 1, 2017', + }, + ], + properties: { + name: [ + 'John Doe', + ], + }, + type: [ + 'h-feed', + ], + }, + ], + 'rel-urls': {}, + rels: {}, + } + +## post + +> should contain relevant microformats data + + { + items: [ + { + properties: { + name: [ + 'John Doe', + ], + photo: [ + '/static/johndoe.jpg', + ], + url: [ + '/', + ], + }, + type: [ + 'h-card', + ], + }, + { + properties: { + content: [ + { + html: '<p>Ut enim blandit volutpat maecenas? Volutpat blandit aliquam etiam erat velit, scelerisque in dictum non, consectetur a erat nam at lectus urna duis convallis convallis tellus, id interdum velit laoreet!</p>', + value: 'Ut enim blandit volutpat maecenas? Volutpat blandit aliquam etiam erat velit, scelerisque in dictum non, consectetur a erat nam at lectus urna duis convallis convallis tellus, id interdum velit laoreet!', + }, + ], + name: [ + 'This is a test', + ], + published: [ + '2017-01-01T00:00:00.000Z', + ], + }, + type: [ + 'h-entry', + ], + }, + ], + 'rel-urls': {}, + rels: {}, + } + +## tags + +> should contain relevant microformats data + + { + items: [ + { + properties: { + name: [ + 'John Doe', + ], + photo: [ + '/static/johndoe.jpg', + ], + url: [ + '/', + ], + }, + type: [ + 'h-card', + ], + }, + { + children: [ + { + properties: { + name: [ + 'This is a test', + ], + published: [ + '2017-01-01T00:00:00.000Z', + ], + url: [ + '/post/testfile', + ], + }, + type: [ + 'h-entry', + ], + value: 'This is a test Sunday, January 1, 2017', + }, + ], + properties: { + name: [ + 'A ยท John Doe', + ], + }, + type: [ + 'h-feed', + ], + }, + ], + 'rel-urls': {}, + rels: {}, + } diff --git a/test/snapshots/app.test.js.snap b/test/snapshots/app.test.js.snap new file mode 100644 index 0000000..bbc5c61 --- /dev/null +++ b/test/snapshots/app.test.js.snap Binary files differ |