-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix blueprints to account for ember-qunit update
- Loading branch information
Showing
8 changed files
with
48 additions
and
99 deletions.
There are no files selected for viewing
18 changes: 9 additions & 9 deletions
18
blueprints/adapter-test/qunit-files/tests/unit/__path__/__test__.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,12 @@ | ||
import { moduleFor, test } from 'ember-qunit'; | ||
import { module, test } from 'qunit'; | ||
import { setupTest } from 'ember-qunit'; | ||
|
||
moduleFor('adapter:<%= dasherizedModuleName %>', '<%= friendlyTestDescription %>', { | ||
// Specify the other units that are required for this test. | ||
// needs: ['serializer:foo'] | ||
}); | ||
module('<%= friendlyTestDescription %>', function(hooks) { | ||
setupTest(hooks); | ||
|
||
// Replace this with your real tests. | ||
test('it exists', function(assert) { | ||
let adapter = this.subject(); | ||
assert.ok(adapter); | ||
// Replace this with your real tests. | ||
test('it exists', function(assert) { | ||
let adapter = this.owner.lookup('adapter:<%= dasherizedModuleName %>'); | ||
assert.ok(adapter); | ||
}); | ||
}); |
12 changes: 0 additions & 12 deletions
12
blueprints/adapter-test/qunit-rfc-232-files/tests/unit/__path__/__test__.js
This file was deleted.
Oops, something went wrong.
20 changes: 11 additions & 9 deletions
20
blueprints/model-test/qunit-files/tests/unit/__path__/__test__.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,14 @@ | ||
import { moduleForModel, test } from 'ember-qunit'; | ||
import { module, test } from 'qunit'; | ||
import { setupTest } from 'ember-qunit'; | ||
import { run } from '@ember/runloop'; | ||
|
||
moduleForModel('<%= dasherizedModuleName %>', '<%= friendlyTestDescription %>', { | ||
// Specify the other units that are required for this test. | ||
<%= typeof needs !== 'undefined' ? needs : '' %> | ||
}); | ||
module('<%= friendlyTestDescription %>', function(hooks) { | ||
setupTest(hooks); | ||
|
||
test('it exists', function(assert) { | ||
let model = this.subject(); | ||
// let store = this.store(); | ||
assert.ok(!!model); | ||
// Replace this with your real tests. | ||
test('it exists', function(assert) { | ||
let store = this.owner.lookup('service:store'); | ||
let model = run(() => store.createRecord('<%= dasherizedModuleName %>', {})); | ||
assert.ok(model); | ||
}); | ||
}); |
14 changes: 0 additions & 14 deletions
14
blueprints/model-test/qunit-rfc-232-files/tests/unit/__path__/__test__.js
This file was deleted.
Oops, something went wrong.
29 changes: 19 additions & 10 deletions
29
blueprints/serializer-test/qunit-files/tests/unit/__path__/__test__.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,24 @@ | ||
import { moduleForModel, test } from 'ember-qunit'; | ||
import { module, test } from 'qunit'; | ||
import { setupTest } from 'ember-qunit'; | ||
import { run } from '@ember/runloop'; | ||
|
||
moduleForModel('<%= dasherizedModuleName %>', '<%= friendlyTestDescription %>', { | ||
// Specify the other units that are required for this test. | ||
needs: ['serializer:<%= dasherizedModuleName %>'] | ||
}); | ||
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); | ||
}); | ||
|
||
// Replace this with your real tests. | ||
test('it serializes records', function(assert) { | ||
let record = this.subject(); | ||
test('it serializes records', function(assert) { | ||
let store = this.owner.lookup('service:store'); | ||
let record = run(() => store.createRecord('<%= dasherizedModuleName %>', {})); | ||
|
||
let serializedRecord = record.serialize(); | ||
let serializedRecord = record.serialize(); | ||
|
||
assert.ok(serializedRecord); | ||
assert.ok(serializedRecord); | ||
}); | ||
}); |
24 changes: 0 additions & 24 deletions
24
blueprints/serializer-test/qunit-rfc-232-files/tests/unit/__path__/__test__.js
This file was deleted.
Oops, something went wrong.
18 changes: 9 additions & 9 deletions
18
blueprints/transform-test/qunit-files/tests/unit/__path__/__test__.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,12 @@ | ||
import { moduleFor, test } from 'ember-qunit'; | ||
import { module, test } from 'qunit'; | ||
import { setupTest } from 'ember-qunit'; | ||
|
||
moduleFor('transform:<%= dasherizedModuleName %>', '<%= friendlyTestDescription %>', { | ||
// Specify the other units that are required for this test. | ||
// needs: ['serializer:foo'] | ||
}); | ||
module('transform:<%= dasherizedModuleName %>', '<%= friendlyTestDescription %>', function(hooks) { | ||
setupTest(hooks); | ||
|
||
// Replace this with your real tests. | ||
test('it exists', function(assert) { | ||
let transform = this.subject(); | ||
assert.ok(transform); | ||
// Replace this with your real tests. | ||
test('it exists', function(assert) { | ||
let transform = this.owner.lookup('transform:<%= dasherizedModuleName %>'); | ||
assert.ok(transform); | ||
}); | ||
}); |
12 changes: 0 additions & 12 deletions
12
blueprints/transform-test/qunit-rfc-232-files/tests/unit/__path__/__test__.js
This file was deleted.
Oops, something went wrong.