Skip to content

Commit

Permalink
fix pages iteration in older ember-data versions
Browse files Browse the repository at this point in the history
  • Loading branch information
mansona committed May 3, 2024
1 parent eb85e0c commit 492863e
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions tests/acceptance/smoke-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,11 @@ module('Acceptance | smoke', function (hooks) {
let store = this.owner.lookup('service:store');
let pages = store.peekAll('page');

// cater for older ember-data versions
if (pages.toArray) {
pages = pages.toArray();
}

for (let section of pages) {
for (let page of section?.pages ?? []) {
await visit(`/release/${page.url}`);
Expand Down

0 comments on commit 492863e

Please sign in to comment.