-
-
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.
- Loading branch information
Showing
1 changed file
with
44 additions
and
0 deletions.
There are no files selected for viewing
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 |
---|---|---|
@@ -0,0 +1,44 @@ | ||
import { module, test } from 'qunit'; | ||
import JSONAPIAdapter from 'ember-data/adapters/json-api'; | ||
import JSONAPISerializer from 'ember-data/serializers/json-api'; | ||
import { setupTest } from 'ember-qunit'; | ||
import Store from 'ember-data/store'; | ||
import Model from 'ember-data/model'; | ||
import { resolve, reject, Promise } from 'rsvp'; | ||
import { attr } from '@ember-decorators/data'; | ||
|
||
class Person extends Model { | ||
@attr name; | ||
} | ||
|
||
module('unit/store async-waiter and leak detection', function(hooks) { | ||
let store; | ||
setupTest(hooks); | ||
|
||
hooks.beforeEach(function() { | ||
let { owner } = this; | ||
owner.register('service:store', Store); | ||
owner.register('model:person', Person); | ||
store = owner.lookup('service:store'); | ||
}); | ||
|
||
test('await properly waits for pending requests', async function(assert) { | ||
|
||
}); | ||
|
||
test('await works even when the adapter rejects', async function(assert) { | ||
|
||
}); | ||
|
||
test('await works even when the adapter throws', async function(assert) { | ||
|
||
}); | ||
|
||
test('when the store is torn down too early, the waiter throws', async function(assert) { | ||
|
||
}); | ||
|
||
test('when configured, pending requests have useful stack traces', async function(assert) { | ||
|
||
}); | ||
}); |