Add unit tests for new function

This commit is contained in:
Jean-Christophe Cuvelier [Artack] 2015-03-26 14:11:43 +01:00
parent fcb4cc6058
commit 2f2461c399

View File

@ -52,10 +52,14 @@ test("Start and stop tracking", function () {
model.set("hello", "world");
collection.add({"e": "f"});
strictEqual(UndoManager.stack.length, before, "Actions weren't added to the stack, because tracking hasn't strated yet");
strictEqual(UndoManager.stack.length, before, "Actions weren't added to the stack, because tracking hasn't started yet");
ok(!UndoManager.isTracking(), "Tracking has not started yet");
UndoManager.startTracking();
ok(UndoManager.isTracking(), "Tracking has now started");
model.set("hello", "you");
collection.remove(collection.last());