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

Add tests #4

Merged
merged 1 commit into from
Aug 26, 2015
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,5 @@ logs
results
npm-debug.log
node_modules
*.actual.json
coverage
12 changes: 9 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,21 @@
"jade-walk": "0.0.2"
},
"devDependencies": {
"mocha": "*"
"istanbul": "^0.3.17",
"jade": "^1.11.0",
"jade-lexer": "0.0.8",
"jade-load": "0.0.3",
"jade-parser": "0.0.8",
"testit": "^2.0.2"
},
"scripts": {
"test": "mocha -R spec"
"coverage": "istanbul cover test",
"test": "node test"
},
"repository": {
"type": "git",
"url": "https://github.com/jadejs/jade-linker.git"
},
"author": "Forbes Lindesay",
"license": "MIT"
}
}
260 changes: 260 additions & 0 deletions test/cases/include-extends-from-root.expected.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,260 @@
{
"type": "Block",
"nodes": [
{
"type": "Block",
"nodes": [
{
"type": "Tag",
"name": "html",
"selfClosing": false,
"block": {
"type": "Block",
"nodes": [
{
"type": "Tag",
"name": "head",
"selfClosing": false,
"block": {
"type": "Block",
"nodes": [
{
"type": "Tag",
"name": "title",
"selfClosing": false,
"block": {
"type": "Block",
"nodes": [
{
"type": "Text",
"val": "My Application",
"line": 3,
"filename": "auxiliary/layout.jade"
}
]
},
"attrs": [],
"attributeBlocks": [],
"isInline": false,
"line": 3,
"filename": "auxiliary/layout.jade"
},
{
"type": "NamedBlock",
"nodes": [],
"line": 4,
"filename": "auxiliary/layout.jade",
"name": "head",
"mode": "replace"
}
]
},
"attrs": [],
"attributeBlocks": [],
"isInline": false,
"line": 2,
"filename": "auxiliary/layout.jade"
},
{
"type": "Tag",
"name": "body",
"selfClosing": false,
"block": {
"type": "Block",
"nodes": [
{
"type": "NamedBlock",
"nodes": [
{
"type": "Block",
"nodes": [
{
"type": "Tag",
"name": "h1",
"selfClosing": false,
"block": {
"type": "Block",
"nodes": [
{
"type": "Text",
"val": "hello",
"line": 1,
"filename": "auxiliary/include-from-root.jade"
}
]
},
"attrs": [],
"attributeBlocks": [],
"isInline": false,
"line": 1,
"filename": "auxiliary/include-from-root.jade"
}
],
"line": 0,
"filename": "auxiliary/include-from-root.jade",
"declaredBlocks": {}
}
],
"line": 6,
"filename": "auxiliary/layout.jade",
"name": "content",
"mode": "replace"
}
]
},
"attrs": [],
"attributeBlocks": [],
"isInline": false,
"line": 5,
"filename": "auxiliary/layout.jade"
}
]
},
"attrs": [],
"attributeBlocks": [],
"isInline": false,
"line": 1,
"filename": "auxiliary/layout.jade"
}
],
"line": 0,
"filename": "auxiliary/layout.jade",
"declaredBlocks": {
"head": {
"type": "NamedBlock",
"nodes": [],
"line": 4,
"filename": "auxiliary/layout.jade",
"name": "head",
"mode": "replace"
},
"content": {
"type": "NamedBlock",
"nodes": [
{
"type": "Block",
"nodes": [
{
"type": "Tag",
"name": "h1",
"selfClosing": false,
"block": {
"type": "Block",
"nodes": [
{
"type": "Text",
"val": "hello",
"line": 1,
"filename": "auxiliary/include-from-root.jade"
}
]
},
"attrs": [],
"attributeBlocks": [],
"isInline": false,
"line": 1,
"filename": "auxiliary/include-from-root.jade"
}
],
"line": 0,
"filename": "auxiliary/include-from-root.jade",
"declaredBlocks": {}
}
],
"line": 3,
"filename": "auxiliary/extends-from-root.jade",
"name": "content",
"mode": "replace",
"parent": {
"type": "NamedBlock",
"nodes": [
{
"type": "Block",
"nodes": [
{
"type": "Tag",
"name": "h1",
"selfClosing": false,
"block": {
"type": "Block",
"nodes": [
{
"type": "Text",
"val": "hello",
"line": 1,
"filename": "auxiliary/include-from-root.jade"
}
]
},
"attrs": [],
"attributeBlocks": [],
"isInline": false,
"line": 1,
"filename": "auxiliary/include-from-root.jade"
}
],
"line": 0,
"filename": "auxiliary/include-from-root.jade",
"declaredBlocks": {}
}
],
"line": 6,
"filename": "auxiliary/layout.jade",
"name": "content",
"mode": "replace"
}
}
}
}
],
"line": 0,
"filename": "include-extends-from-root.jade",
"declaredBlocks": {
"head": {
"type": "NamedBlock",
"nodes": [],
"line": 4,
"filename": "auxiliary/layout.jade",
"name": "head",
"mode": "replace"
},
"content": {
"type": "NamedBlock",
"nodes": [
{
"type": "Block",
"nodes": [
{
"type": "Tag",
"name": "h1",
"selfClosing": false,
"block": {
"type": "Block",
"nodes": [
{
"type": "Text",
"val": "hello",
"line": 1,
"filename": "auxiliary/include-from-root.jade"
}
]
},
"attrs": [],
"attributeBlocks": [],
"isInline": false,
"line": 1,
"filename": "auxiliary/include-from-root.jade"
}
],
"line": 0,
"filename": "auxiliary/include-from-root.jade",
"declaredBlocks": {}
}
],
"line": 6,
"filename": "auxiliary/layout.jade",
"name": "content",
"mode": "replace"
}
}
}
Loading