A Karma+Mocha HTML reporter with HTML annotations.
karma-mocha-html-annotations-reporter is currently being written to develop workflow.
Since workflow has a lot of graphic algorithms which need to be covered by tests and whose purpose is hard to put into words or ascii art, this reporter provides an annotate function to add HTML to the test description and a reporter to render the result in Karma's server page.
- add karma-mocha-html-annotations-reporter to your karma.conf.* reporters
- when using typescript add:
import {annotate} from "karma-mocha-html-annotations-reporter"
- use the annotate function to add html annotations to your test report
describe("workflow", function() { describe("wordwrap", function() { it("works", function() { let svg = document.createElementNS("http://www.w3.org/2000/svg", "svg") ... annotate(this, svg) }) }) })