Skip to content

Commit 3bf7a6e

Browse files
committed
Update some expectEvents expectations
This is going away though!
1 parent 4590aa3 commit 3bf7a6e

File tree

1 file changed

+16
-24
lines changed

1 file changed

+16
-24
lines changed

packages/host/tests/integration/resources/search-test.ts

+16-24
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,8 @@ import LoaderService from '@cardstack/host/services/loader-service';
1717

1818
import RealmService from '@cardstack/host/services/realm';
1919

20+
import { IndexRealmEventContent } from 'https://cardstack.com/base/matrix-event';
21+
2022
import {
2123
CardDocFiles,
2224
lookupLoaderService,
@@ -326,21 +328,16 @@ module(`Integration | search resource`, function (hooks) {
326328
assert.strictEqual(search.instances[0].id, `${testRealmURL}books/1`);
327329
assert.strictEqual(search.instances[1].id, `${testRealmURL}books/2`);
328330

329-
let expectedEvents = [
331+
let expectedEvents: IndexRealmEventContent[] = [
330332
{
331-
type: 'index',
332-
data: {
333-
type: 'incremental-index-initiation',
334-
realmURL: testRealmURL,
335-
updatedFile: `${testRealmURL}book/3`,
336-
},
333+
eventName: 'index',
334+
indexType: 'incremental-index-initiation',
335+
updatedFile: `${testRealmURL}book/3`,
337336
},
338337
{
339-
type: 'index',
340-
data: {
341-
type: 'incremental',
342-
invalidations: [`${testRealmURL}book/3`],
343-
},
338+
eventName: 'index',
339+
indexType: 'incremental',
340+
invalidations: [`${testRealmURL}book/3`],
344341
},
345342
];
346343
await this.expectEvents({
@@ -403,21 +400,16 @@ module(`Integration | search resource`, function (hooks) {
403400
assert.strictEqual(search.instances.length, 2);
404401
assert.strictEqual((search.instances[0] as any).author.firstName, `Mango`);
405402

406-
let expectedEvents = [
403+
let expectedEvents: IndexRealmEventContent[] = [
407404
{
408-
type: 'index',
409-
data: {
410-
type: 'incremental-index-initiation',
411-
realmURL: testRealmURL,
412-
updatedFile: `${testRealmURL}book/1`,
413-
},
405+
eventName: 'index',
406+
indexType: 'incremental-index-initiation',
407+
updatedFile: `${testRealmURL}book/1`,
414408
},
415409
{
416-
type: 'index',
417-
data: {
418-
type: 'incremental',
419-
invalidations: [`${testRealmURL}book/1`],
420-
},
410+
eventName: 'index',
411+
indexType: 'incremental',
412+
invalidations: [`${testRealmURL}book/1`],
421413
},
422414
];
423415

0 commit comments

Comments
 (0)