Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/oscarmarina/test-runner-mocha-style-reporter
Mocha-Style reporter for @web/test-runner
https://github.com/oscarmarina/test-runner-mocha-style-reporter
Last synced: 11 days ago
JSON representation
Mocha-Style reporter for @web/test-runner
- Host: GitHub
- URL: https://github.com/oscarmarina/test-runner-mocha-style-reporter
- Owner: oscarmarina
- License: mit
- Created: 2021-10-07T11:40:17.000Z (about 3 years ago)
- Default Branch: main
- Last Pushed: 2023-03-07T19:38:01.000Z (over 1 year ago)
- Last Synced: 2024-09-14T23:52:10.842Z (about 2 months ago)
- Language: JavaScript
- Size: 289 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Mocha-style reporter for Test Runner API
## Install package
```js
npm install @blockquote/test-runner-mocha-style-reporter --save-dev
```## web-test-runner.config.mjs
```js
import { defaultReporter } from '@web/test-runner';
import { mochaStyleReporter } from '@blockquote/test-runner-mocha-style-reporter';...
reporters: [
defaultReporter(),
mochaStyleReporter(),
],
...```
### Reporters: Overview
By default, the reporter will report both test results and test coverage. You can disable these reports by passing options to the mochaStyleReporter() function:```js
import { defaultReporter } from '@web/test-runner';
import { mochaStyleReporter } from '@blockquote/test-runner-mocha-style-reporter';...
reporters: [
defaultReporter(),
mochaStyleReporter({ reportResults: true, reportCoverage: true }),
],
...```
## Reporter for web test runner
See [moder-web website](https://modern-web.dev/docs/test-runner/reporters/write-your-own/) for full documentation.
![reporter example](./test-runner-mocha-style-reporter.png)