Security News
ESLint is Now Language-Agnostic: Linting JSON, Markdown, and Beyond
ESLint has added JSON and Markdown linting support with new officially-supported plugins, expanding its versatility beyond JavaScript.
mutation-testing-elements
Advanced tools
A suite of elements designed to display a mutation testing report.
Note: Please see https://stryker-mutator.io for an introduction to mutation testing.
The mutation test report supports the following features:
📊 Calculates and displays the mutation score and other metrics
📁 Group results into directories
👓 Show mutants directly in your source code
😎 Code highlighting with highlightjs
🧙 Filter mutants based on the outcome
🔗 Deep linking using anchors (uses fragment, so path will not be contaminated)
✨ A nice (yet basic) UI with embedded bootstrap css
🎓 Adheres to custom element best practices
Install with npm:
$ npm install mutation-testing-elements
Add to your page:
<script defer src="mutation-test-elements/dist/mutation-test-elements.js"></script>
Or you can use the unpkg as your CDN:
<script defer src="https://www.unpkg.com/mutation-testing-elements"></script>
Use the mutation-test-report-app
element to load the mutation test report.
<mutation-test-report-app src="mutation-report.json" title-postfix="Mutation Test Report"></mutation-test-report-app>
This loads the report from the source (src
) and displays it.
Alternatively, you can use property binding directly:
<mutation-test-report-app></mutation-test-report-app>
<script>
document.getElementsByTagName('mutation-test-report-app').item(0).report = {
/* ... */
}
</script>
Feel free to use other ways to bind the report
property. For example, you can use <mutation-test-report-app [report]="myReport"></mutation-test-report-app>
to bind report
to the myReport
property in an Angular component.
The mutation testing report data is expected to be in the format of a the mutation-testing-report-schema. Please view that readme to understand the structure.
For some examples, please see the testResources.
src
[string
]Default: undefined
Specify a source to load the mutation testing report from. The source is expected to be in JSON format and adhere to the mutation-testing-report-schema.
report
[object
]Default: undefined
Specify the mutation testing report directly by binding it to this property. It is expected to adhere to the mutation-testing-report-schema.
titlePostfix
[string
]Default: undefined
Specify the postfix to append to the title of the current page. It us reflected as attribute: title-postfix
.
These elements are built with LitElement, which uses the Web Components set of standards. They are currently supported by all major browsers with the exception of Edge.
For compatibility with older browsers and Edge, load the Web Components polyfills: https://lit-element.polymer-project.org/guide/use#polyfills
1.2.3 (2019-12-11)
Note: Version bump only for package root
FAQs
A suite of web components for a mutation testing report.
The npm package mutation-testing-elements receives a total of 72,644 weekly downloads. As such, mutation-testing-elements popularity was classified as popular.
We found that mutation-testing-elements demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 3 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
ESLint has added JSON and Markdown linting support with new officially-supported plugins, expanding its versatility beyond JavaScript.
Security News
Members Hub is conducting large-scale campaigns to artificially boost Discord server metrics, undermining community trust and platform integrity.
Security News
NIST has failed to meet its self-imposed deadline of clearing the NVD's backlog by the end of the fiscal year. Meanwhile, CVE's awaiting analysis have increased by 33% since June.