Skip to content

Commit

Permalink
[Test]: fix for RecordData refactor in emberjs
Browse files Browse the repository at this point in the history
  • Loading branch information
snewcomer committed Feb 20, 2021
1 parent fe844e4 commit 1bb9b38
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion packages/-ember-data/tests/integration/debug-adapter-test.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { A } from '@ember/array';
import { get } from '@ember/object';
import { settled } from '@ember/test-helpers';
import { settled, waitUntil } from '@ember/test-helpers';

import { module, test } from 'qunit';

Expand Down Expand Up @@ -90,6 +90,7 @@ module('integration/debug-adapter - DS.DebugAdapter', function(hooks) {
addedRecords = wrappedRecords;
};
var recordsUpdated = function(wrappedRecords) {
debugger;
updatedRecords = wrappedRecords;
};
var recordsRemoved = function(index, count) {
Expand All @@ -112,6 +113,8 @@ module('integration/debug-adapter - DS.DebugAdapter', function(hooks) {

let post = await store.findRecord('post', 1);

await waitUntil(() => updatedRecords && updatedRecords.length === 1, { timeout: 5000 });

post.set('title', 'Modified Post');

assert.equal(get(updatedRecords, 'length'), 1, 'We updated 1 post');
Expand Down

0 comments on commit 1bb9b38

Please sign in to comment.