How to use the ember-test-helpers.getContext function in ember-test-helpers

To help you get started, we’ve selected a few ember-test-helpers 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 emberjs / ember-qunit / lib / ember-qunit / test-wrapper.js View on Github external
function wrapper() {
    var context = getContext();

    var result = callback.apply(context, arguments);

    function failTestOnPromiseRejection(reason) {
      var message;
      if (reason instanceof Error) {
        message = reason.stack;
        if (reason.message && message && message.indexOf(reason.message) < 0) {
          // PhantomJS has a `stack` that does not contain the actual
          // exception message.
          message = Ember.inspect(reason) + "\n" + message;
        }
      } else {
        message = Ember.inspect(reason);
      }
      ok(false, message);
github ember-animation / ember-animated / tests / helpers / module-for-integration.js View on Github external
setupContext: function() {
    setContext({
      container:  this.container,
      registry: this.registry,
      factory: function() {},
      dispatcher: null
    });

    this.context = getContext();
  },