Browse Source

Remove test coverage support

Until I figure out how to get coverage for both Elisp and JS code.
reboot
Nicolas Petton 3 years ago
parent
commit
c0c749aee2
No known key found for this signature in database GPG Key ID: E8BCD7866AFCF978
2 changed files with 0 additions and 24 deletions
  1. +0
    -1
      readme.md
  2. +0
    -23
      test/test-helper.el

+ 0
- 1
readme.md View File

@ -2,7 +2,6 @@
[![MELPA](https://melpa.org/packages/indium-badge.svg)](https://melpa.org/#/indium)
[![Emacs](https://img.shields.io/badge/Emacs-25-8e44bd.svg)](https://www.gnu.org/software/emacs/)
[![build status](http://gitlab.petton.fr/nico/Indium/badges/master/build.svg)](http://gitlab.petton.fr/nico/Indium/commits/master)
[![coverage report](https://gitlab.petton.fr/nico/Indium/badges/master/coverage.svg)](https://gitlab.petton.fr/nico/Indium/commits/master)
[![Documentation Status](https://readthedocs.org/projects/indium/badge/?version=latest)](http://indium.readthedocs.io/en/latest/?badge=latest)
[![Liberapay](http://img.shields.io/liberapay/receives/NicolasPetton.svg?logo=liberapay)](http://img.shields.io/liberapay/receives/NicolasPetton.svg?logo=liberapay)
[![Gitter](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/indium-emacs?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)


+ 0
- 23
test/test-helper.el View File

@ -28,33 +28,10 @@
(require 'map)
(require 'assess)
(when (require 'undercover nil t)
(setq undercover-force-coverage t)
(undercover "*.el" (:exclude "run-lint.el" "test/*.el")))
(advice-add 'undercover-report :after #'print-coverage-report-safe)
(defvar indium-nodejs--test-fs
'((".indium.json" "{\"configurations\": [{\"type\": \"node\", \"command\": \"node\"}]}")
("index.js" "console.log('foo')")))
(defun print-coverage-report-safe (&rest _)
(ignore-errors
(print-coverage-report)))
(defun print-coverage-report ()
(let* ((coverage (apply #'seq-concatenate 'list
(seq-map (lambda (src)
(let ((coverage (map-elt src 'coverage)))
(seq-filter #'identity coverage)))
(map-elt (json-read-file "/tmp/undercover_coveralls_report") 'source_files))))
(covered-lines (seq-filter (lambda (line)
(not (zerop line)))
coverage))
(percentage (round (* (/ (seq-length covered-lines) (seq-length coverage) 1.0) 100))))
(message "%d%% covered" percentage)))
(defmacro with-js2-buffer (contents &rest body)
"Evaluate BODY.


Loading…
Cancel
Save