diff --git a/test/ops.js b/test/ops.js index 9138c01..cb605b2 100644 --- a/test/ops.js +++ b/test/ops.js @@ -60,4 +60,108 @@ describe("morphing operations", function () { ], ); }); + + it.skip("prepending a new softmatchable node onto the beginning", function () { + assertOps( + "
AB
", + "
NewAB
", + [ + [ + "Morphed", + "
AB
", + "
NewAB
", + ], + ["Added", "New"], + ["Morphed", "A", "A"], + ["Morphed", "B", "B"], + ], + ); + }); + + it.skip("inserting a new softmatchable node into the middle", function () { + assertOps( + "
ABCD
", + "
ABNewCD
", + [ + [ + "Morphed", + "
ABCD
", + "
ABNewCD
", + ], + ["Morphed", "A", "A"], + ["Morphed", "B", "B"], + ["Added", "New"], + ["Morphed", "C", "C"], + ["Morphed", "D", "D"], + ], + ); + }); + + it("appending a new softmatchable node onto the end", function () { + assertOps( + "
AB
", + "
ABNew
", + [ + [ + "Morphed", + "
AB
", + "
ABNew
", + ], + ["Morphed", "A", "A"], + ["Morphed", "B", "B"], + ["Added", "New"], + ], + ); + }); + + it.skip("removing a softmatchable node from the front", function () { + assertOps( + "
ABC
", + "
BC
", + [ + [ + "Morphed", + "
ABC
", + "
BC
", + ], + ["Removed", "A"], + ["Morphed", "B", "B"], + ["Morphed", "C", "C"], + ], + ); + }); + + it.skip("removing a softmatchable node from the middle", function () { + assertOps( + "
ABC
", + "
AC
", + [ + [ + "Morphed", + "
ABC
", + "
AC
", + ], + ["Morphed", "A", "A"], + ["Removed", "B"], + ["Morphed", "C", "C"], + ], + ); + }); + + it("removing a softmatchable node from the end", function () { + assertOps( + "
ABC
", + "
AB
", + [ + [ + "Morphed", + "
ABC
", + "
AB
", + ], + ["Morphed", "A", "A"], + ["Morphed", "B", "B"], + ["Removed", "C"], + ], + ); + }); });