Skip to content

Commit

Permalink
stub out tests for waiter
Browse files Browse the repository at this point in the history
  • Loading branch information
runspired committed Jul 27, 2018
1 parent 471771a commit ee5939d
Showing 1 changed file with 44 additions and 0 deletions.
44 changes: 44 additions & 0 deletions tests/unit/store/async-leak-test.js
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) {

});
});

0 comments on commit ee5939d

Please sign in to comment.