aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPhil Crosby2014-08-12 08:21:16 -0700
committerPhil Crosby2014-08-12 08:22:33 -0700
commit4ab75878b3d59c0f970195bfae191781e0b9f5b3 (patch)
treeea72c612ee7a20859e800e2ab75029096180159a
parent5b53d69d2698e65204413711675770b017d02883 (diff)
downloadvimium-4ab75878b3d59c0f970195bfae191781e0b9f5b3.tar.bz2
Add a TODO to tighten up the contract of some tests
-rw-r--r--tests/dom_tests/dom_tests.coffee6
1 files changed, 6 insertions, 0 deletions
diff --git a/tests/dom_tests/dom_tests.coffee b/tests/dom_tests/dom_tests.coffee
index 0b2a9d89..ac3f9ebe 100644
--- a/tests/dom_tests/dom_tests.coffee
+++ b/tests/dom_tests/dom_tests.coffee
@@ -184,6 +184,12 @@ context "Input focus",
assert.equal "third", document.activeElement.id
handlerStack.bubbleEvent 'keydown', mockKeyboardEvent("A")
+# TODO: these find prev/next link tests could be refactored into unit tests which invoke a function which has
+# a tighter contract than goNext(), since they test minor aspects of goNext()'s link matching behavior, and we
+# don't need to construct external state many times over just to test that.
+# i.e. these tests should look something like:
+# assert.equal(findLink(html("<a href=...">))[0].href, "first")
+# These could then move outside of the dom_tests file.
context "Find prev / next links",
setup ->