dockest
Version:
Dockest is an integration testing tool aimed at alleviating the process of evaluating unit tests whilst running multi-container Docker applications.
19 lines • 991 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.runJest = void 0;
const logger_1 = require("../logger");
const runJest = async ({ jestLib, jestOpts, jestOpts: { projects }, mutables, }) => {
logger_1.Logger.info('DockestServices running, running Jest', { endingNewLines: 1 });
// typecasting required due to runCLI's first argument's messy typings: `yargs.Arguments<Partial<{...}>>`
const { results } = await jestLib.runCLI(jestOpts, projects !== null && projects !== void 0 ? projects : []);
const { success, numFailedTests, numTotalTests } = results;
success
? logger_1.Logger.info(`[Jest] All tests passed`, { startingNewLines: 1, endingNewLines: 1, success: true })
: logger_1.Logger.error(`[Jest] ${numFailedTests}/${numTotalTests} tests failed`, { endingNewLines: 1 });
mutables.jestRanWithResult = true;
return {
success,
};
};
exports.runJest = runJest;
//# sourceMappingURL=run-jest.js.map