UNPKG

ring-websites-toolbelt

Version:

Ring Publishing Platform tool to work with Ring Websites

35 lines (29 loc) 925 B
const fs = require('fs'); const path = require('path'); const Jasmine = require('jasmine'); const RouterScriptAbstract = require(`../../RouterScriptAbstract`); class Router extends RouterScriptAbstract { constructor(options) { super(options); } async execute() { this.validateRouterJson(); console.info('Running tests using Jasmine'); var jasmine = new Jasmine({ projectBaseDir: __dirname }); jasmine.loadConfig({ random: false, stopSpecOnExpectationFailure: true }); jasmine.onComplete((passed) => { if (passed) { console.info('All tests have passed'); } else { console.error('At least one test has failed'); } }); jasmine.execute(['./jasmine/*Spec.js']); } } module.exports = Router;