3rd party Mocha reporter written in ReactJS
This is a custom reporter for the Mocha test framework written in React/Grommet. The two current views are the Dashboard and Details View, which include:
This reporter was designed mainly to be displayed as a status board over a respective workspace. The Details View is included to provide and expand on the functionality of any standard mocha reporter. App licensed to HPE.
npm install mocha-grommet-reporter
Place <div id='mocha'></div>
where you want the application to run. NOTE: div MUST have id='mocha'
<!DOCTYPE html>
<html lang="en">
<head>
<title>Mocha API Checker</title>
</head>
<body>
<div id='mocha'></div>
<script src='/bundle.js'></script>
</body>
</html>
Create index.js in the source directory and place the following code inside:
import mochaGrommetReporter from 'mocha-grommet-reporter';
import { Mocha } from 'mocha/mocha.js';
mocha.setup({
ui: 'bdd',
slow: 1500,
timeout: 10000,
reporter: mochaGrommetReporter
});
// place test files here
require('./index.test.js');
mocha.run();
Use the mocha-grommet-reporter-example to test