Skip to content

Commit

Permalink
fix perf test
Browse files Browse the repository at this point in the history
  • Loading branch information
runspired committed May 12, 2021
1 parent d23ded9 commit f993c2b
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ export default Route.extend({
performance.mark('start-destroy-records');
const children = await parent.children;

const childrenPromise = all(children.map((child) => child.destroyRecord()));
const childrenPromise = all(children.toArray().map((child) => child.destroyRecord()));
const parentPromise = parent.destroyRecord();

await all([childrenPromise, parentPromise]);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ export default Route.extend({

// runloop to ensure destroy does not escape bounds of the test
run(() => {
children.forEach((child) => child.unloadRecord());
children.toArray().forEach((child) => child.unloadRecord());
});
performance.mark('end-unload-records');
},
Expand Down

0 comments on commit f993c2b

Please sign in to comment.