Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
const failedTests: FailedTestInfo[] = [];
// A lot of the code below is adapted from
// node_modules/jasmine-core/lib/jasmine-core/boot.js
// it provides a custom way to start jasmine in the RN app.
// Helper function for adding jasmine functionlaity to global.
// tslint:disable-next-line: no-any
function extend(destination: any, source: any) {
for (const property in source) {
destination[property] = source[property];
}
return destination;
}
const jasmine = jasmineRequire.core(jasmineRequire);
// @ts-ignore
global.jasmine = jasmine;
const env: jasmine.Env = jasmine.getEnv();
const jasmineInterface = jasmineRequire.interface(jasmine, env);
extend(global, jasmineInterface);
//@ts-ignore
env.configure({ random: false });
// Custom reporter to collect the test results
const reactReporter: jasmine.CustomReporter = {
jasmineStarted: suiteInfo => {
// The console.warn below seems necessary in order for the spy on
// console.warn defined in one of the tests to run corrently.
console.warn('starting tests');