test: improve test coverage (#23)
This commit is contained in:
parent
6ea90facd1
commit
226d39cc78
1 changed files with 472 additions and 21 deletions
|
|
@ -52,6 +52,17 @@ void main() async {
|
|||
assert(transaction.operations[2] is UpdateOperation);
|
||||
assert(isInsertAndPathEqual(transaction.operations[3], [0], '0'));
|
||||
});
|
||||
|
||||
test("HistoryItem sealed", () {
|
||||
final historyItem = HistoryItem();
|
||||
|
||||
historyItem.add(
|
||||
DeleteOperation([0], [TextNode(delta: Delta()..insert('0'))]),
|
||||
);
|
||||
|
||||
historyItem.seal();
|
||||
expect(historyItem.sealed, true);
|
||||
});
|
||||
}
|
||||
|
||||
bool isInsertAndPathEqual(Operation operation, Path path, [String? content]) {
|
||||
|
|
|
|||
Loading…
Reference in a new issue