diff options
Diffstat (limited to 'test')
-rw-r--r-- | test/lisp/progmodes/js-tests.el | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/test/lisp/progmodes/js-tests.el b/test/lisp/progmodes/js-tests.el index 99f5898525b..07e659af605 100644 --- a/test/lisp/progmodes/js-tests.el +++ b/test/lisp/progmodes/js-tests.el @@ -118,6 +118,16 @@ if (!/[ (:,='\"]/.test(value)) { ;; implementation not recognizing the comment example. (should-not (syntax-ppss-context (syntax-ppss)))))) +(ert-deftest js-mode-indentation-error () + (with-temp-buffer + (js-mode) + ;; The bug previously was that requesting re-indentation on the + ;; "{" line here threw an exception. + (insert "const TESTS = [\n{") + (js-indent-line) + ;; Any success is ok here. + (should t))) + (provide 'js-tests) ;;; js-tests.el ends here |