Skip to content

Commit

Permalink
chore: update test from v4
Browse files Browse the repository at this point in the history
  • Loading branch information
runspired committed Dec 19, 2024
1 parent 739352a commit 6052300
Showing 1 changed file with 5 additions and 7 deletions.
12 changes: 5 additions & 7 deletions tests/main/tests/integration/request-state-service-test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,11 @@ import JSONSerializer from '@ember-data/serializer/json';
import type Store from '@ember-data/store';

class Person extends Model {
// TODO fix the typing for naked attrs

@attr('string', {})
name;
declare name: string;

@attr('string', {})
lastName;
declare lastName: string;
}

module('integration/request-state-service - Request State Service', function (hooks) {
Expand All @@ -27,7 +25,7 @@ module('integration/request-state-service - Request State Service', function (ho
const { owner } = this;
owner.register('model:person', Person);
owner.register('serializer:application', JSONSerializer);
store = owner.lookup('service:store') as unknown as Store;
store = owner.lookup('service:store') as Store;
});

test('getPendingRequest and getLastRequest return correct inflight and fulfilled requests', async function (assert) {
Expand Down Expand Up @@ -73,7 +71,7 @@ module('integration/request-state-service - Request State Service', function (ho

owner.register('adapter:application', TestAdapter);

store = owner.lookup('service:store') as unknown as Store;
store = owner.lookup('service:store') as Store;

const promise = store.findRecord('person', '1');
const requestService = store.getRequestStateService();
Expand Down Expand Up @@ -172,7 +170,7 @@ module('integration/request-state-service - Request State Service', function (ho

owner.register('adapter:application', TestAdapter, { singleton: false });

store = owner.lookup('service:store') as unknown as Store;
store = owner.lookup('service:store') as Store;

const requestService = store.getRequestStateService();
// Relying on sequential lids until identifiers land
Expand Down

0 comments on commit 6052300

Please sign in to comment.