|
1 | 1 | // Jest Snapshot v1, https://goo.gl/fbAQLP |
2 | 2 |
|
3 | 3 | exports[`inspector inspect should render a document wrapper 1`] = ` |
4 | | -"└ root |
5 | | - └ paragraph |
6 | | - └ span \\"Test\\" |
| 4 | +"└ paragraph |
| 5 | + └ span \\"Test\\" |
7 | 6 | " |
8 | 7 | `; |
9 | 8 |
|
10 | 9 | exports[`inspector inspect should render a simple root node 1`] = ` |
11 | | -"└ root |
12 | | - └ paragraph |
13 | | - └ span \\"Hello World\\" |
| 10 | +"└ paragraph |
| 11 | + └ span \\"Hello World\\" |
14 | 12 | " |
15 | 13 | `; |
16 | 14 |
|
17 | 15 | exports[`inspector inspect should render block and inline block nodes 1`] = ` |
18 | | -"└ root |
19 | | - ├ block (item: \\"block-123\\") |
20 | | - └ paragraph |
21 | | - ├ span \\"Text with \\" |
22 | | - ├ inlineBlock (item: \\"inline-456\\") |
23 | | - └ span \\" inline block\\" |
| 16 | +"├ block (item: \\"block-123\\") |
| 17 | +└ paragraph |
| 18 | + ├ span \\"Text with \\" |
| 19 | + ├ inlineBlock (item: \\"inline-456\\") |
| 20 | + └ span \\" inline block\\" |
24 | 21 | " |
25 | 22 | `; |
26 | 23 |
|
27 | 24 | exports[`inspector inspect should render code nodes with language and content 1`] = ` |
28 | | -"└ root |
29 | | - ├ code (language: \\"javascript\\") \\"console.log(\\"Hello, World!\\");\\" |
30 | | - └ code \\"echo \\"No language specified\\"\\" |
| 25 | +"├ code (language: \\"javascript\\") \\"console.log(\\"Hello, World!\\");\\" |
| 26 | +└ code \\"echo \\"No language specified\\"\\" |
31 | 27 | " |
32 | 28 | `; |
33 | 29 |
|
34 | 30 | exports[`inspector inspect should render heading nodes with level 1`] = ` |
35 | | -"└ root |
36 | | - ├ heading (level: 1) |
37 | | - │ └ span \\"Main Title\\" |
38 | | - └ heading (level: 2) |
39 | | - └ span \\"Subtitle\\" |
| 31 | +"├ heading (level: 1) |
| 32 | +│ └ span \\"Main Title\\" |
| 33 | +└ heading (level: 2) |
| 34 | + └ span \\"Subtitle\\" |
40 | 35 | " |
41 | 36 | `; |
42 | 37 |
|
43 | 38 | exports[`inspector inspect should render link nodes with URL and meta 1`] = ` |
44 | | -"└ root |
45 | | - └ paragraph |
46 | | - ├ span \\"Visit \\" |
47 | | - ├ link (url: \\"https://example.com\\") |
48 | | - │ └ span \\"this link\\" |
49 | | - └ link (url: \\"https://meta.example.com\\", meta: {title=\\"Example Site\\", target=\\"_blank\\"}) |
50 | | - └ span \\"link with meta\\" |
| 39 | +"└ paragraph |
| 40 | + ├ span \\"Visit \\" |
| 41 | + ├ link (url: \\"https://example.com\\") |
| 42 | + │ └ span \\"this link\\" |
| 43 | + └ link (url: \\"https://meta.example.com\\", meta: {title=\\"Example Site\\", target=\\"_blank\\"}) |
| 44 | + └ span \\"link with meta\\" |
51 | 45 | " |
52 | 46 | `; |
53 | 47 |
|
54 | 48 | exports[`inspector inspect should render list nodes with style 1`] = ` |
55 | | -"└ root |
56 | | - └ list (style: bulleted) |
57 | | - ├ listItem |
58 | | - │ └ paragraph |
59 | | - │ └ span \\"First item\\" |
60 | | - └ listItem |
61 | | - └ paragraph |
62 | | - └ span \\"Second item\\" |
| 49 | +"└ list (style: bulleted) |
| 50 | + ├ listItem |
| 51 | + │ └ paragraph |
| 52 | + │ └ span \\"First item\\" |
| 53 | + └ listItem |
| 54 | + └ paragraph |
| 55 | + └ span \\"Second item\\" |
63 | 56 | " |
64 | 57 | `; |
65 | 58 |
|
66 | 59 | exports[`inspector inspect should render multiple children with correct tree structure 1`] = ` |
67 | | -"└ root |
68 | | - ├ paragraph |
69 | | - │ └ span \\"First paragraph\\" |
70 | | - └ paragraph |
71 | | - └ span \\"Second paragraph\\" |
| 60 | +"├ paragraph |
| 61 | +│ └ span \\"First paragraph\\" |
| 62 | +└ paragraph |
| 63 | + └ span \\"Second paragraph\\" |
72 | 64 | " |
73 | 65 | `; |
74 | 66 |
|
75 | 67 | exports[`inspector inspect should render paragraph with custom style 1`] = ` |
76 | | -"└ root |
77 | | - └ paragraph (style: \\"custom-style\\") |
78 | | - └ span \\"Styled paragraph\\" |
| 68 | +"└ paragraph (style: \\"custom-style\\") |
| 69 | + └ span \\"Styled paragraph\\" |
79 | 70 | " |
80 | 71 | `; |
81 | 72 |
|
82 | 73 | exports[`inspector inspect should render span nodes with marks 1`] = ` |
83 | | -"└ root |
84 | | - └ paragraph |
85 | | - ├ span \\"Normal text\\" |
86 | | - ├ span (marks: strong) \\"Bold text\\" |
87 | | - └ span (marks: strong, emphasis) \\"Bold italic\\" |
| 74 | +"└ paragraph |
| 75 | + ├ span \\"Normal text\\" |
| 76 | + ├ span (marks: strong) \\"Bold text\\" |
| 77 | + └ span (marks: strong, emphasis) \\"Bold italic\\" |
88 | 78 | " |
89 | 79 | `; |
90 | 80 |
|
91 | 81 | exports[`inspector inspect should render thematic break 1`] = ` |
92 | | -"└ root |
93 | | - ├ paragraph |
94 | | - │ └ span \\"Before break\\" |
95 | | - ├ thematicBreak |
96 | | - └ paragraph |
97 | | - └ span \\"After break\\" |
| 82 | +"├ paragraph |
| 83 | +│ └ span \\"Before break\\" |
| 84 | +├ thematicBreak |
| 85 | +└ paragraph |
| 86 | + └ span \\"After break\\" |
98 | 87 | " |
99 | 88 | `; |
100 | 89 |
|
101 | 90 | exports[`inspector inspect should truncate long text content 1`] = ` |
102 | | -"└ root |
103 | | - ├ paragraph |
104 | | - │ └ span \\"aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa...\\" |
105 | | - └ code \\"aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa...\\" |
| 91 | +"├ paragraph |
| 92 | +│ └ span \\"aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa...\\" |
| 93 | +└ code \\"aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa...\\" |
| 94 | +" |
| 95 | +`; |
| 96 | + |
| 97 | +exports[`inspector inspect with block formatter should add TreeNode children to blocks without existing children 1`] = ` |
| 98 | +"└ block |
| 99 | + └ Block Info |
| 100 | + ├ Title: Block with TreeNode Children |
| 101 | + └ ID: block-789 |
106 | 102 | " |
107 | 103 | `; |
108 | 104 |
|
109 | 105 | exports[`inspector inspect with block formatter should fall back to default formatting when no formatter provided 1`] = ` |
110 | | -"└ root |
111 | | - ├ block (item: \\"block-123\\") |
112 | | - └ paragraph |
113 | | - └ inlineBlock (item: \\"inline-456\\") |
| 106 | +"├ block (item: \\"block-123\\") |
| 107 | +└ paragraph |
| 108 | + └ inlineBlock (item: \\"inline-456\\") |
114 | 109 | " |
115 | 110 | `; |
116 | 111 |
|
117 | 112 | exports[`inspector inspect with block formatter should fall back to default formatting when no formatter provided 2`] = ` |
118 | | -"└ root |
119 | | - ├ block (item: \\"block-123\\") |
120 | | - └ paragraph |
121 | | - └ inlineBlock (item: \\"inline-456\\") |
| 113 | +"├ block (item: \\"block-123\\") |
| 114 | +└ paragraph |
| 115 | + └ inlineBlock (item: \\"inline-456\\") |
122 | 116 | " |
123 | 117 | `; |
124 | 118 |
|
125 | 119 | exports[`inspector inspect with block formatter should format block with ID using custom formatter 1`] = ` |
126 | | -"└ root |
127 | | - └ block ID: block-123 |
| 120 | +"└ block ID: block-123 |
128 | 121 | " |
129 | 122 | `; |
130 | 123 |
|
131 | 124 | exports[`inspector inspect with block formatter should format block with object using custom formatter 1`] = ` |
132 | | -"└ root |
133 | | - └ block My Block Title (block-456) |
| 125 | +"└ block My Block Title (block-456) |
134 | 126 | " |
135 | 127 | `; |
136 | 128 |
|
137 | 129 | exports[`inspector inspect with block formatter should format inline blocks with custom formatter 1`] = ` |
138 | | -"└ root |
139 | | - └ paragraph |
140 | | - ├ span \\"Click \\" |
141 | | - ├ inlineBlock Button: \\"Click me\\" |
142 | | - └ span \\" to continue\\" |
| 130 | +"└ paragraph |
| 131 | + ├ span \\"Click \\" |
| 132 | + ├ inlineBlock Button: \\"Click me\\" |
| 133 | + └ span \\" to continue\\" |
| 134 | +" |
| 135 | +`; |
| 136 | + |
| 137 | +exports[`inspector inspect with block formatter should handle TreeNode returns for inline blocks 1`] = ` |
| 138 | +"└ paragraph |
| 139 | + ├ span \\"Click \\" |
| 140 | + ├ inlineBlock |
| 141 | + │ └ button (button-123) |
| 142 | + │ ├ Variant: primary |
| 143 | + │ └ Size: large |
| 144 | + └ span \\" to continue\\" |
| 145 | +" |
| 146 | +`; |
| 147 | + |
| 148 | +exports[`inspector inspect with block formatter should handle blockFormatter returning a single TreeNode 1`] = ` |
| 149 | +"└ block |
| 150 | + └ Content: Block content here |
| 151 | + ├ Title: My Block Title |
| 152 | + └ ID: block-123 |
| 153 | +" |
| 154 | +`; |
| 155 | + |
| 156 | +exports[`inspector inspect with block formatter should handle blockFormatter returning an array of TreeNodes 1`] = ` |
| 157 | +"└ block |
| 158 | + ├ Properties |
| 159 | + │ ├ Title: Complex Block |
| 160 | + │ └ ID: block-456 |
| 161 | + └ Metadata |
| 162 | + ├ Author: Jane Doe |
| 163 | + └ Tags |
| 164 | + ├ important |
| 165 | + └ feature |
143 | 166 | " |
144 | 167 | `; |
145 | 168 |
|
146 | 169 | exports[`inspector inspect with block formatter should handle multi-line block formatter output 1`] = ` |
147 | | -"└ root |
148 | | - ├ paragraph |
149 | | - │ └ span \\"Before block\\" |
150 | | - ├ block |
151 | | - │ Complex Block (block-789) |
152 | | - │ Description: A detailed description |
153 | | - │ Author: John Doe |
154 | | - │ Date: 2023-01-01 |
155 | | - └ paragraph |
156 | | - └ span \\"After block\\" |
| 170 | +"├ paragraph |
| 171 | +│ └ span \\"Before block\\" |
| 172 | +├ block Complex Block (block-789) Description: A detailed description Author: John Doe Date: 2023-01-01 |
| 173 | +└ paragraph |
| 174 | + └ span \\"After block\\" |
157 | 175 | " |
158 | 176 | `; |
159 | 177 |
|
160 | 178 | exports[`inspector inspect with block formatter should provide max line width to formatter 1`] = ` |
161 | | -"└ root |
162 | | - └ block |
163 | | - My Block |
164 | | - Description: This is a very long description that might exceed the suggested line width |
165 | | - ID: block-123 |
| 179 | +"└ block My Block Description: This is a very long description that might exceed the suggested line width ID: block-123 |
| 180 | +" |
| 181 | +`; |
| 182 | + |
| 183 | +exports[`inspector inspect with block formatter should treat string returns as single-line (strip newlines) 1`] = ` |
| 184 | +"└ block Title: Multi-line Block Description: Description with multiple lines ID: block-789 |
166 | 185 | " |
167 | 186 | `; |
0 commit comments