We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent b89c69f commit 0dac41bCopy full SHA for 0dac41b
frontend/appflowy_flutter/packages/appflowy_editor/test/core/document/node_test.dart
@@ -228,5 +228,23 @@ void main() async {
228
final textNode = TextNode.empty()..delta = (Delta()..insert('AppFlowy'));
229
expect(textNode.toPlainText(), 'AppFlowy');
230
});
231
+ test('test node id', () {
232
+ final nodeA = Node(
233
+ type: 'example',
234
+ children: LinkedList(),
235
+ attributes: {},
236
+ );
237
+ final nodeAId = nodeA.id;
238
+ expect(nodeAId, 'example');
239
+ final nodeB = Node(
240
241
242
+ attributes: {
243
+ 'subtype': 'exampleSubtype',
244
+ },
245
246
+ final nodeBId = nodeB.id;
247
+ expect(nodeBId, 'example/exampleSubtype');
248
+ });
249
250
}
0 commit comments