Posts

Showing posts with the label emacs

Jest coverage highlighting in emacs not updating after change

Jest coverage highlighting in emacs not updating after change I have emacs minor mode for jest coverage highlighting and when I change coverage (update my tests) and run this function the highlighting is not updating. (defun jc/mark-buffer () (interactive) (let* ((dir (jc/root-git-repo)) (json-object-type 'hash-table) (json-array-type 'list) (json-key-type 'string) (json (json-read-file (concat dir "/coverage/coverage-final.json"))) (filename (buffer-file-name (current-buffer))) (coverage (gethash filename json)) (statments (gethash "statementMap" coverage))) (save-excursion (let ((coverage-list (gethash "s" coverage)) (covered 0) (not-covered 0)) (maphash (lambda (key value) (if (not (and jc/statements (= (gethash key jc/statements) value))) (let* ((statment (gethash key statments)) ...