From 8a47e549733fe72a19ce27d0e3a4c3be561892f0 Mon Sep 17 00:00:00 2001 From: Edward Faulkner Date: Wed, 6 Apr 2022 22:32:37 -0400 Subject: [PATCH] Fix tests under ember-data 4.x The static-app tests were using a deprecated pattern that was dropped in ember-data 4.x. --- tests/scenarios/static-app-test.ts | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/tests/scenarios/static-app-test.ts b/tests/scenarios/static-app-test.ts index d1d359036..413c97247 100644 --- a/tests/scenarios/static-app-test.ts +++ b/tests/scenarios/static-app-test.ts @@ -19,7 +19,7 @@ appScenarios import JSONAPIAdapter from '@ember-data/adapter/json-api'; export default class PostAdapter extends JSONAPIAdapter { findRecord(store, type, id, snapshot) { - return { data: { type: 'posts', id: '0 ', attributes: { title: 'Hello world' } } }; + return { data: { type: 'posts', id: '0', attributes: { title: 'Hello world' } } }; } } `, @@ -90,6 +90,12 @@ appScenarios } `, }, + serializers: { + 'application.js': ` + import JSONAPISerializer from '@ember-data/serializer/json-api'; + export default class extends JSONAPISerializer {}; + `, + }, templates: { components: { 'default-title.hbs': `