Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
const fs = require('fs');
const path = require('path');
const bazelJasmine = require('@bazel/jasmine');
const runfiles = require(process.env['BAZEL_NODE_RUNFILES_HELPER']);
const JasmineRunner = bazelJasmine.jasmine;
const JUnitXmlReporter = bazelJasmine.JUnitXmlReporter;
let jasmineCore = null
if (global.jasmine) {
// global.jasmine has been initialized which means a bootstrap script
// has already required `jasmine-core` and called jasmineCore.boot()
jasmineCore = global.jasmineCore;
if (!jasmineCore) {
jasmineCore = bazelJasmine.jasmineCore;
}
// Override the jasmineCore boot function so that the jasmine
// runner gets the already initialize jasmine and its shared environment
jasmineCore.boot = function() {
return global.jasmine
};
}