Skip to content

Commit

Permalink
test: add Delete node test
Browse files Browse the repository at this point in the history
  • Loading branch information
azu committed Nov 25, 2023
1 parent e195c35 commit adbdc15
Show file tree
Hide file tree
Showing 3 changed files with 216 additions and 0 deletions.
1 change: 1 addition & 0 deletions test/fixtures/delete-node/_input.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
test~~test~~test
97 changes: 97 additions & 0 deletions test/fixtures/delete-node/input.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,97 @@
{
"type": "Paragraph",
"children": [
{
"type": "Str",
"value": "test",
"loc": {
"start": {
"line": 1,
"column": 0
},
"end": {
"line": 1,
"column": 4
}
},
"range": [
0,
4
],
"raw": "test"
},
{
"type": "Delete",
"children": [
{
"type": "Str",
"value": "test",
"loc": {
"start": {
"line": 1,
"column": 6
},
"end": {
"line": 1,
"column": 10
}
},
"range": [
6,
10
],
"raw": "test"
}
],
"loc": {
"start": {
"line": 1,
"column": 4
},
"end": {
"line": 1,
"column": 12
}
},
"range": [
4,
12
],
"raw": "~~test~~"
},
{
"type": "Str",
"value": "test",
"loc": {
"start": {
"line": 1,
"column": 12
},
"end": {
"line": 1,
"column": 16
}
},
"range": [
12,
16
],
"raw": "test"
}
],
"loc": {
"start": {
"line": 1,
"column": 0
},
"end": {
"line": 1,
"column": 16
}
},
"range": [
0,
16
],
"raw": "test~~test~~test"
}
118 changes: 118 additions & 0 deletions test/fixtures/delete-node/output.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,118 @@
{
"type": "Paragraph",
"children": [
{
"type": "Sentence",
"raw": "test~~test~~test",
"loc": {
"start": {
"line": 1,
"column": 0
},
"end": {
"line": 1,
"column": 16
}
},
"range": [
0,
16
],
"children": [
{
"type": "Str",
"raw": "test",
"value": "test",
"loc": {
"start": {
"line": 1,
"column": 0
},
"end": {
"line": 1,
"column": 4
}
},
"range": [
0,
4
]
},
{
"type": "Delete",
"children": [
{
"type": "Str",
"value": "test",
"loc": {
"start": {
"line": 1,
"column": 6
},
"end": {
"line": 1,
"column": 10
}
},
"range": [
6,
10
],
"raw": "test"
}
],
"loc": {
"start": {
"line": 1,
"column": 4
},
"end": {
"line": 1,
"column": 12
}
},
"range": [
4,
12
],
"raw": "~~test~~"
},
{
"type": "Str",
"raw": "test",
"value": "test",
"loc": {
"start": {
"line": 1,
"column": 12
},
"end": {
"line": 1,
"column": 16
}
},
"range": [
12,
16
]
}
],
"contexts": []
}
],
"loc": {
"start": {
"line": 1,
"column": 0
},
"end": {
"line": 1,
"column": 16
}
},
"range": [
0,
16
],
"raw": "test~~test~~test"
}

0 comments on commit adbdc15

Please sign in to comment.