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

Commit

Permalink
Simplify declared blocks in test output
Browse files Browse the repository at this point in the history
This should make changes to snapshots easier to review
  • Loading branch information
ForbesLindesay committed Sep 20, 2016
1 parent f8f99ba commit c6830d9
Show file tree
Hide file tree
Showing 11 changed files with 46 additions and 1,150 deletions.
106 changes: 5 additions & 101 deletions test/cases/include-extends-from-root.expected.json
Original file line number Diff line number Diff line change
Expand Up @@ -132,86 +132,22 @@
"declaredBlocks": {
"head": {
"type": "NamedBlock",
"nodes": [],
"nodes": "<NODES>",
"line": 4,
"filename": "auxiliary/layout.pug",
"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.pug"
}
],
"line": 1,
"filename": "auxiliary/include-from-root.pug"
},
"attrs": [],
"attributeBlocks": [],
"isInline": false,
"line": 1,
"filename": "auxiliary/include-from-root.pug"
}
],
"line": 0,
"filename": "auxiliary/include-from-root.pug",
"declaredBlocks": {}
}
],
"nodes": "<NODES>",
"line": 3,
"filename": "auxiliary/extends-from-root.pug",
"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.pug"
}
],
"line": 1,
"filename": "auxiliary/include-from-root.pug"
},
"attrs": [],
"attributeBlocks": [],
"isInline": false,
"line": 1,
"filename": "auxiliary/include-from-root.pug"
}
],
"line": 0,
"filename": "auxiliary/include-from-root.pug",
"declaredBlocks": {}
}
],
"nodes": "<NODES>",
"line": 6,
"filename": "auxiliary/layout.pug",
"name": "content",
Expand All @@ -226,47 +162,15 @@
"declaredBlocks": {
"head": {
"type": "NamedBlock",
"nodes": [],
"nodes": "<NODES>",
"line": 4,
"filename": "auxiliary/layout.pug",
"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.pug"
}
],
"line": 1,
"filename": "auxiliary/include-from-root.pug"
},
"attrs": [],
"attributeBlocks": [],
"isInline": false,
"line": 1,
"filename": "auxiliary/include-from-root.pug"
}
],
"line": 0,
"filename": "auxiliary/include-from-root.pug",
"declaredBlocks": {}
}
],
"nodes": "<NODES>",
"line": 6,
"filename": "auxiliary/layout.pug",
"name": "content",
Expand Down
130 changes: 5 additions & 125 deletions test/cases/include-extends-of-common-template.expected.json
Original file line number Diff line number Diff line change
Expand Up @@ -42,62 +42,14 @@
"declaredBlocks": {
"test": {
"type": "NamedBlock",
"nodes": [
{
"type": "Tag",
"name": "div",
"selfClosing": false,
"block": {
"type": "Block",
"nodes": [
{
"type": "Text",
"val": "test1",
"line": 4,
"filename": "auxiliary/extends-empty-block-1.pug"
}
],
"line": 4,
"filename": "auxiliary/extends-empty-block-1.pug"
},
"attrs": [],
"attributeBlocks": [],
"isInline": false,
"line": 4,
"filename": "auxiliary/extends-empty-block-1.pug"
}
],
"nodes": "<NODES>",
"line": 3,
"filename": "auxiliary/extends-empty-block-1.pug",
"name": "test",
"mode": "replace",
"parent": {
"type": "NamedBlock",
"nodes": [
{
"type": "Tag",
"name": "div",
"selfClosing": false,
"block": {
"type": "Block",
"nodes": [
{
"type": "Text",
"val": "test1",
"line": 4,
"filename": "auxiliary/extends-empty-block-1.pug"
}
],
"line": 4,
"filename": "auxiliary/extends-empty-block-1.pug"
},
"attrs": [],
"attributeBlocks": [],
"isInline": false,
"line": 4,
"filename": "auxiliary/extends-empty-block-1.pug"
}
],
"nodes": "<NODES>",
"line": 1,
"filename": "auxiliary/empty-block.pug",
"name": "test",
Expand Down Expand Up @@ -147,62 +99,14 @@
"declaredBlocks": {
"test": {
"type": "NamedBlock",
"nodes": [
{
"type": "Tag",
"name": "div",
"selfClosing": false,
"block": {
"type": "Block",
"nodes": [
{
"type": "Text",
"val": "test2",
"line": 4,
"filename": "auxiliary/extends-empty-block-2.pug"
}
],
"line": 4,
"filename": "auxiliary/extends-empty-block-2.pug"
},
"attrs": [],
"attributeBlocks": [],
"isInline": false,
"line": 4,
"filename": "auxiliary/extends-empty-block-2.pug"
}
],
"nodes": "<NODES>",
"line": 3,
"filename": "auxiliary/extends-empty-block-2.pug",
"name": "test",
"mode": "replace",
"parent": {
"type": "NamedBlock",
"nodes": [
{
"type": "Tag",
"name": "div",
"selfClosing": false,
"block": {
"type": "Block",
"nodes": [
{
"type": "Text",
"val": "test2",
"line": 4,
"filename": "auxiliary/extends-empty-block-2.pug"
}
],
"line": 4,
"filename": "auxiliary/extends-empty-block-2.pug"
},
"attrs": [],
"attributeBlocks": [],
"isInline": false,
"line": 4,
"filename": "auxiliary/extends-empty-block-2.pug"
}
],
"nodes": "<NODES>",
"line": 1,
"filename": "auxiliary/empty-block.pug",
"name": "test",
Expand All @@ -217,31 +121,7 @@
"declaredBlocks": {
"test": {
"type": "NamedBlock",
"nodes": [
{
"type": "Tag",
"name": "div",
"selfClosing": false,
"block": {
"type": "Block",
"nodes": [
{
"type": "Text",
"val": "test2",
"line": 4,
"filename": "auxiliary/extends-empty-block-2.pug"
}
],
"line": 4,
"filename": "auxiliary/extends-empty-block-2.pug"
},
"attrs": [],
"attributeBlocks": [],
"isInline": false,
"line": 4,
"filename": "auxiliary/extends-empty-block-2.pug"
}
],
"nodes": "<NODES>",
"line": 1,
"filename": "auxiliary/empty-block.pug",
"name": "test",
Expand Down
25 changes: 5 additions & 20 deletions test/cases/include-extends-relative.expected.json
Original file line number Diff line number Diff line change
Expand Up @@ -105,32 +105,22 @@
"declaredBlocks": {
"head": {
"type": "NamedBlock",
"nodes": [],
"nodes": "<NODES>",
"line": 4,
"filename": "../cases-src/auxiliary/layout.pug",
"name": "head",
"mode": "replace"
},
"content": {
"type": "NamedBlock",
"nodes": [
{
"type": "Text",
"val": "h1 hello"
}
],
"nodes": "<NODES>",
"line": 3,
"filename": "../cases-src/auxiliary/extends-relative.pug",
"name": "content",
"mode": "replace",
"parent": {
"type": "NamedBlock",
"nodes": [
{
"type": "Text",
"val": "h1 hello"
}
],
"nodes": "<NODES>",
"line": 6,
"filename": "../cases-src/auxiliary/layout.pug",
"name": "content",
Expand All @@ -145,20 +135,15 @@
"declaredBlocks": {
"head": {
"type": "NamedBlock",
"nodes": [],
"nodes": "<NODES>",
"line": 4,
"filename": "../cases-src/auxiliary/layout.pug",
"name": "head",
"mode": "replace"
},
"content": {
"type": "NamedBlock",
"nodes": [
{
"type": "Text",
"val": "h1 hello"
}
],
"nodes": "<NODES>",
"line": 6,
"filename": "../cases-src/auxiliary/layout.pug",
"name": "content",
Expand Down

0 comments on commit c6830d9

Please sign in to comment.