How to use the ember-qunit.setupTest 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 emberjs / data / packages / adapter / node-tests / fixtures / adapter-test / foo-default.js View on Github external
module('Unit | Adapter | foo', function(hooks) {
  setupTest(hooks);

  // Replace this with your real tests.
  test('it exists', function(assert) {
    let adapter = this.owner.lookup('adapter:foo');
    assert.ok(adapter);
  });
});
github emberjs / data / packages / serializer / node-tests / fixtures / serializer-test / rfc232.js View on Github external
module('Unit | Serializer | foo', function(hooks) {
  setupTest(hooks);

  // Replace this with your real tests.
  test('it exists', function(assert) {
    let store = this.owner.lookup('service:store');
    let serializer = store.serializerFor('foo');

    assert.ok(serializer);
  });

  test('it serializes records', function(assert) {
    let store = this.owner.lookup('service:store');
    let record = store.createRecord('foo', {});

    let serializedRecord = record.serialize();

    assert.ok(serializedRecord);
github emberjs / data / packages / serializer / blueprints / transform-test / qunit-files / __root__ / __path__ / __test__.js View on Github external
module('<%= friendlyTestDescription %>', function(hooks) {
  setupTest(hooks);

  // Replace this with your real tests.
  test('it exists', function(assert) {
    let transform = this.owner.lookup('transform:<%= dasherizedModuleName %>');
    assert.ok(transform);
  });
});
github emberjs / data / packages / serializer / blueprints / serializer-test / qunit-files / __root__ / __path__ / __test__.js View on Github external
module('<%= friendlyTestDescription %>', function(hooks) {
  setupTest(hooks);

  // Replace this with your real tests.
  test('it exists', function(assert) {
    let store = this.owner.lookup('service:store');
    let serializer = store.serializerFor('<%= dasherizedModuleName %>');

    assert.ok(serializer);
  });

  test('it serializes records', function(assert) {
    let store = this.owner.lookup('service:store');
    let record = store.createRecord('<%= dasherizedModuleName %>', {});

    let serializedRecord = record.serialize();

    assert.ok(serializedRecord);
github CenterForOpenScience / ember-osf-web / tests / unit / models / user-registration.ts View on Github external
module('Unit | Model | user-registration', hooks => {
    setupTest(hooks);

    // Replace this with your real tests.
    test('it exists', function(assert) {
        const store = this.owner.lookup('service:store');
        const model = run(() => store.createRecord('user-registration', {}));
        assert.ok(model);
    });
});
github emberjs / data / node-tests / fixtures / serializer-test / foo-default.js View on Github external
module('Unit | Serializer | foo', function(hooks) {
  setupTest(hooks);

  // Replace this with your real tests.
  test('it exists', function(assert) {
    let store = this.owner.lookup('service:store');
    let serializer = store.serializerFor('foo');

    assert.ok(serializer);
  });

  test('it serializes records', function(assert) {
    let store = this.owner.lookup('service:store');
    let record = run(() => store.createRecord('foo', {}));

    let serializedRecord = record.serialize();

    assert.ok(serializedRecord);
github emberjs / ember.js / blueprints / service-test / qunit-rfc-232-files / __root__ / __testType__ / __path__ / __test__.js View on Github external
module('<%= friendlyTestDescription %>', function(hooks) {
  setupTest(hooks);

  // Replace this with your real tests.
  test('it exists', function(assert) {
    let service = this.owner.lookup('service:<%= dasherizedModuleName %>');
    assert.ok(service);
  });
});
github CenterForOpenScience / ember-osf-web / tests / helpers / engines.ts View on Github external
export function setupEngineTest(hooks: any, engine: string) {
    // eslint-disable-next-line ember/no-restricted-resolver-tests
    setupTest(hooks, { resolver: engineResolverFor(engine) });
    setupEngineFixtures(hooks);
}
github emberjs / ember.js / node-tests / fixtures / component-test / rfc232-unit.js View on Github external
module('Unit | Component | x-foo', function(hooks) {
  setupTest(hooks);

  test('it exists', function(assert) {
    let component = this.owner.factoryFor('component:x-foo').create();
    assert.ok(component);
  });
});