pegjs/test/browser.stub.js

24 lines
426 B
JavaScript
Raw Normal View History

/* globals mocha */
2019-02-13 07:43:48 +01:00
"use strict";
/*
This file is loaded through Webpack to automatically get mocha test files,
and create a valid bundled file that executes on the browser.
*/
2019-02-14 12:05:27 +01:00
require( "mocha/mocha.js" );
2019-02-14 12:41:46 +01:00
mocha.setup( {
2019-02-14 13:07:46 +01:00
reporter: "html",
2019-02-14 12:41:46 +01:00
ui: "bdd",
} );
2019-02-14 12:05:27 +01:00
const context = require.context( "./", true, /.+\.(spec|test)\.js?$/ );
2019-02-13 07:43:48 +01:00
context.keys().forEach( context );
2019-02-14 12:41:46 +01:00
process.nextTick( () => mocha.run() );