@@ -17,6 +17,8 @@ import LoaderService from '@cardstack/host/services/loader-service';
17
17
18
18
import RealmService from '@cardstack/host/services/realm' ;
19
19
20
+ import { IndexRealmEventContent } from 'https://cardstack.com/base/matrix-event' ;
21
+
20
22
import {
21
23
CardDocFiles ,
22
24
lookupLoaderService ,
@@ -326,21 +328,16 @@ module(`Integration | search resource`, function (hooks) {
326
328
assert . strictEqual ( search . instances [ 0 ] . id , `${ testRealmURL } books/1` ) ;
327
329
assert . strictEqual ( search . instances [ 1 ] . id , `${ testRealmURL } books/2` ) ;
328
330
329
- let expectedEvents = [
331
+ let expectedEvents : IndexRealmEventContent [ ] = [
330
332
{
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` ,
337
336
} ,
338
337
{
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` ] ,
344
341
} ,
345
342
] ;
346
343
await this . expectEvents ( {
@@ -403,21 +400,16 @@ module(`Integration | search resource`, function (hooks) {
403
400
assert . strictEqual ( search . instances . length , 2 ) ;
404
401
assert . strictEqual ( ( search . instances [ 0 ] as any ) . author . firstName , `Mango` ) ;
405
402
406
- let expectedEvents = [
403
+ let expectedEvents : IndexRealmEventContent [ ] = [
407
404
{
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` ,
414
408
} ,
415
409
{
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` ] ,
421
413
} ,
422
414
] ;
423
415
0 commit comments