How to use the jasmine-core/lib/jasmine-core/jasmine.core function in jasmine-core

To help you get started, we’ve selected a few jasmine-core examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github expo / expo / apps / test-suite / screens / TestScreen.js View on Github external
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);
      }
    };
github expo / expo / apps / test-suite / utils / setupJasmine.js View on Github external
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);
    }
  };
github expo / expo-asset-utils / example / App.js View on Github external
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);
      }
    };