Merge pull request #16 from totophe/master
Add unit tests for new function
This commit is contained in:
commit
e2eb4feffa
@ -52,10 +52,14 @@ test("Start and stop tracking", function () {
|
|||||||
model.set("hello", "world");
|
model.set("hello", "world");
|
||||||
collection.add({"e": "f"});
|
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();
|
UndoManager.startTracking();
|
||||||
|
|
||||||
|
ok(UndoManager.isTracking(), "Tracking has now started");
|
||||||
|
|
||||||
model.set("hello", "you");
|
model.set("hello", "you");
|
||||||
collection.remove(collection.last());
|
collection.remove(collection.last());
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user