Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
async _setupJasmine() {
// Init
jasmineModule.DEFAULT_TIMEOUT_INTERVAL = 10000;
const jasmineCore = jasmineModule.core(jasmineModule);
const jasmineEnv = jasmineCore.getEnv();
// Add our custom reporters too
jasmineEnv.addReporter(this._jasmineSetStateReporter());
jasmineEnv.addReporter(this._jasmineConsoleReporter());
// Get the interface and make it support `async ` by default
const jasmine = jasmineModule.interface(jasmineCore, jasmineEnv);
const doneIfy = fn => async done => {
try {
await Promise.resolve(fn());
done();
} catch (e) {
done.fail(e);
}
};
export default async function setupJasmine(app, onStart, onComplete) {
// Init
jasmineModule.DEFAULT_TIMEOUT_INTERVAL = 10000;
const jasmineCore = jasmineModule.core(jasmineModule);
const jasmineEnv = jasmineCore.getEnv();
// Add our custom reporters too
jasmineEnv.addReporter(jasmineSetStateReporter(app, onStart, onComplete));
jasmineEnv.addReporter(jasmineConsoleReporter(app));
// Get the interface and make it support `async ` by default
const jasmine = jasmineModule.interface(jasmineCore, jasmineEnv);
const doneIfy = fn => async done => {
try {
await fn();
done();
} catch (e) {
done.fail(e);
}
};
async _setupJasmine() {
// Init
jasmineModule.DEFAULT_TIMEOUT_INTERVAL = 10000;
const jasmineCore = jasmineModule.core(jasmineModule);
const jasmineEnv = jasmineCore.getEnv();
// Add our custom reporters too
jasmineEnv.addReporter(this._jasmineSetStateReporter());
jasmineEnv.addReporter(this._jasmineConsoleReporter());
// Get the interface and make it support `async ` by default
const jasmine = jasmineModule.interface(jasmineCore, jasmineEnv);
const doneIfy = fn => async done => {
try {
await Promise.resolve(fn());
done();
} catch (e) {
done.fail(e);
}
};