Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
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);
});
});
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);
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);
});
});
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);
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);
});
});
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);
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);
});
});
export function setupEngineTest(hooks: any, engine: string) {
// eslint-disable-next-line ember/no-restricted-resolver-tests
setupTest(hooks, { resolver: engineResolverFor(engine) });
setupEngineFixtures(hooks);
}
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);
});
});
module('foo service', function(hooks) {
setupTest(hooks);
});