Skip to content
This repository has been archived by the owner on Feb 28, 2022. It is now read-only.

Commit

Permalink
fix: Added corresponding tests
Browse files Browse the repository at this point in the history
  • Loading branch information
kptdobe committed Mar 7, 2019
1 parent 66ec9f0 commit 48b44d8
Show file tree
Hide file tree
Showing 5 changed files with 95 additions and 0 deletions.
42 changes: 42 additions & 0 deletions test/fixtures/sections/2images.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
[
{
"title": "helix-logo\nhelix-logo",
"types": [
"has-image",
"nb-image-2",
"is-image-only"
],
"image": "./helix_logo.png",
"intro": "helix-logo\nhelix-logo",
"meta": {},
"type": "root",
"children": [
{
"type": "paragraph",
"children": [
{
"type": "image",
"title": null,
"url": "./helix_logo.png",
"alt": "helix-logo"
},
{
"type": "text",
"value": "\n"
},
{
"type": "image",
"title": null,
"url": "./helix_logo.png",
"alt": "helix-logo"
}
],
"data": {
"types": [
"has-image"
]
}
}
]
}
]
2 changes: 2 additions & 0 deletions test/fixtures/sections/2images.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
![helix-logo](./helix_logo.png)
![helix-logo](./helix_logo.png)
48 changes: 48 additions & 0 deletions test/fixtures/sections/paragraphwithlink.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
[
{
"title": "This is a paragraph with a link!",
"types": [
"has-text",
"has-link",
"nb-text-2",
"nb-link-1",
"is-text-link",
"is-text"
],
"intro": "This is a paragraph with a link!",
"meta": {},
"type": "root",
"children": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "This is a paragraph with a "
},
{
"type": "link",
"title": null,
"url": "/index.html",
"children": [
{
"type": "text",
"value": "link"
}
]
},
{
"type": "text",
"value": "!"
}
],
"data": {
"types": [
"is-text",
"has-link"
]
}
}
]
}
]
1 change: 1 addition & 0 deletions test/fixtures/sections/paragraphwithlink.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
This is a paragraph with a [link](/index.html)!
2 changes: 2 additions & 0 deletions test/testGetMetadata.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,8 @@ function callback(body) {
const SECTIONS_BLOCS = [
'header',
'paragraph',
'paragraphwithlink',
'2images',
'headerparagraph',
'headerlist',
'headerimage',
Expand Down

0 comments on commit 48b44d8

Please sign in to comment.