How to use the ember-qunit.module function in ember-qunit

To help you get started, we’ve selected a few ember-qunit 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 DockYard / ember-admin / tests / helpers / module-for-acceptance.js View on Github external
export default function(name, options = {}) {
  module(name, {
    beforeEach() {
      this.application = startApp();

      if (options.beforeEach) {
        return options.beforeEach(...arguments);
      }
    },

    afterEach() {
      let afterEach = options.afterEach && options.afterEach(...arguments);
      return resolve(afterEach).then(() => destroyApp(this.application));
    }
  });
}
github Addepar / ember-table / tests / helpers / module.js View on Github external
export function scenarioModule(scenarios, callback) {
  for (let scenario in scenarios) {
    module(scenario, function(...moduleArgs) {
      callback(scenarios[scenario], ...moduleArgs);
    });
  }
}