How to use the ember-qunit.moduleForModel 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 DefinitelyTyped / DefinitelyTyped / types / ember-qunit / ember-qunit-tests.ts View on Github external
import Ember from 'ember';
import hbs from 'htmlbars-inline-precompile';
import { test, skip, moduleFor, moduleForModel, moduleForComponent, setResolver } from 'ember-qunit';

moduleForComponent('x-foo', {
    integration: true
});

moduleForComponent('x-foo', {
    unit: true,
    needs: ['helper:pluralize-string']
});

moduleForModel('user', {
    needs: ['model:child']
});

moduleFor('controller:home');

moduleFor('component:x-foo', 'Some description');

moduleFor('component:x-foo', 'TestModule callbacks', {
    beforeSetup() {
    },

    beforeEach(assert) {
        this.registry.register('helper:i18n', {});
        this.register('service:i18n', {});
        this.inject.service('i18n');
        this.inject.service('i18n', { as: 'i18n' });
github DefinitelyTyped / DefinitelyTyped / types / ember-qunit / v3 / ember-qunit-tests.ts View on Github external
moduleForComponent,
    setResolver,
    setupRenderingTest,
    setupTest,
} from 'ember-qunit';

moduleForComponent('x-foo', {
    integration: true
});

moduleForComponent('x-foo', {
    unit: true,
    needs: ['helper:pluralize-string']
});

moduleForModel('user', {
    needs: ['model:child']
});

moduleFor('controller:home');

moduleFor('component:x-foo', 'Some description');

moduleFor('component:x-foo', 'TestModule callbacks', {
    beforeSetup() {
    },

    beforeEach(assert) {
        this.registry.register('helper:i18n', {});
        this.register('service:i18n', {});
        this.inject.service('i18n');
        this.inject.service('i18n', { as: 'i18n' });