branch: master commit 3cff17629369e14366f95b93af6fb66acbb74b64 Author: Jackson Ray Hamilton <jack...@jacksonrayhamilton.com> Commit: Jackson Ray Hamilton <jack...@jacksonrayhamilton.com>
Add failing key-value pair test. --- test/context-coloring-test.el | 17 +++++++++++++++++ test/fixtures/key-values.js | 8 ++++++++ 2 files changed, 25 insertions(+), 0 deletions(-) diff --git a/test/context-coloring-test.el b/test/context-coloring-test.el index 3fa7953..52a93fb 100644 --- a/test/context-coloring-test.el +++ b/test/context-coloring-test.el @@ -235,4 +235,21 @@ invoke when it is done." "./fixtures/property-lookup.js" (context-coloring-test-js-property-lookup))) +(defun context-coloring-test-js-key-values () + (context-coloring-test-assert-region-level 78 79 1)) + +(ert-deftest-async context-coloring-test-js-mode-key-values (done) + (context-coloring-test-js-mode + "./fixtures/key-values.js" + (lambda (teardown) + (unwind-protect + (context-coloring-test-js-key-values) + (funcall teardown)) + (funcall done)))) + +(ert-deftest context-coloring-test-js2-mode-key-values () + (context-coloring-test-js2-mode + "./fixtures/key-values.js" + (context-coloring-test-js-key-values))) + (provide 'context-coloring-test) diff --git a/test/fixtures/key-values.js b/test/fixtures/key-values.js new file mode 100644 index 0000000..41bdedd --- /dev/null +++ b/test/fixtures/key-values.js @@ -0,0 +1,8 @@ +(function () { + var a; + (function () { + return { + b: a + }; + }()); +}());