@@ -190,7 +190,7 @@ describe('LynxWorkspaceService', () => {
190190 return await this . realtimeService . get < TextDoc > ( TextDoc . COLLECTION , id , new DocSubscription ( 'spec' ) ) ;
191191 }
192192
193- createMockProjectDoc ( id : string = PROJECT_ID , lynxConfig ?: LynxConfig ) : Promise < SFProjectProfileDoc > {
193+ async createMockProjectDoc ( id : string = PROJECT_ID , lynxConfig ?: LynxConfig ) : Promise < SFProjectProfileDoc > {
194194 const projectData = createTestProjectProfile ( {
195195 texts : [
196196 {
@@ -273,7 +273,7 @@ describe('LynxWorkspaceService', () => {
273273 }
274274
275275 async triggerProjectChange ( id : string , lynxConfig ?: LynxConfig ) : Promise < void > {
276- this . projectDocTestSubject$ . next ( this . createMockProjectDoc ( id , lynxConfig ) ) ;
276+ this . projectDocTestSubject$ . next ( await this . createMockProjectDoc ( id , lynxConfig ) ) ;
277277 tick ( ) ;
278278 }
279279
@@ -384,7 +384,7 @@ describe('LynxWorkspaceService', () => {
384384 when ( mockWorkspaceFactory . createWorkspace ( anything ( ) , anything ( ) ) ) . thenReturn ( workspaceMock as any ) ;
385385
386386 // Set up project and workspace
387- const projectDoc = env . createMockProjectDoc ( PROJECT_ID , {
387+ const projectDoc = await env . createMockProjectDoc ( PROJECT_ID , {
388388 autoCorrectionsEnabled : true ,
389389 assessmentsEnabled : true ,
390390 punctuationCheckerEnabled : true ,
@@ -557,7 +557,7 @@ describe('LynxWorkspaceService', () => {
557557 flush ( ) ;
558558
559559 // Create project with lynx features enabled so documents will be opened
560- const projectDoc = env . createMockProjectDoc ( PROJECT_ID , {
560+ const projectDoc = await env . createMockProjectDoc ( PROJECT_ID , {
561561 autoCorrectionsEnabled : true ,
562562 assessmentsEnabled : true ,
563563 punctuationCheckerEnabled : true ,
@@ -589,7 +589,7 @@ describe('LynxWorkspaceService', () => {
589589 flush ( ) ;
590590
591591 // Create project with lynx features enabled so documents will be opened
592- const projectDoc = env . createMockProjectDoc ( PROJECT_ID , {
592+ const projectDoc = await env . createMockProjectDoc ( PROJECT_ID , {
593593 autoCorrectionsEnabled : true ,
594594 assessmentsEnabled : true ,
595595 punctuationCheckerEnabled : true ,
@@ -614,7 +614,7 @@ describe('LynxWorkspaceService', () => {
614614 flush ( ) ;
615615
616616 // Set up project with lynx features enabled so documents will be opened
617- const projectDoc = env . createMockProjectDoc ( PROJECT_ID , {
617+ const projectDoc = await env . createMockProjectDoc ( PROJECT_ID , {
618618 autoCorrectionsEnabled : true ,
619619 assessmentsEnabled : true ,
620620 punctuationCheckerEnabled : true ,
@@ -646,7 +646,7 @@ describe('LynxWorkspaceService', () => {
646646 flush ( ) ;
647647
648648 // Set up project with lynx features enabled
649- const projectDoc = env . createMockProjectDoc ( PROJECT_ID , {
649+ const projectDoc = await env . createMockProjectDoc ( PROJECT_ID , {
650650 autoCorrectionsEnabled : false ,
651651 assessmentsEnabled : true ,
652652 punctuationCheckerEnabled : true ,
@@ -677,7 +677,7 @@ describe('LynxWorkspaceService', () => {
677677 flush ( ) ;
678678
679679 // Set up project with lynx features enabled
680- const projectDoc = env . createMockProjectDoc ( PROJECT_ID , {
680+ const projectDoc = await env . createMockProjectDoc ( PROJECT_ID , {
681681 autoCorrectionsEnabled : false ,
682682 assessmentsEnabled : true ,
683683 punctuationCheckerEnabled : true ,
@@ -716,7 +716,7 @@ describe('LynxWorkspaceService', () => {
716716 flush ( ) ;
717717
718718 // Set up project with lynx features enabled
719- const projectDoc = env . createMockProjectDoc ( PROJECT_ID , {
719+ const projectDoc = await env . createMockProjectDoc ( PROJECT_ID , {
720720 autoCorrectionsEnabled : false ,
721721 assessmentsEnabled : true ,
722722 punctuationCheckerEnabled : true ,
@@ -746,7 +746,7 @@ describe('LynxWorkspaceService', () => {
746746 flush ( ) ;
747747
748748 // Set up project with lynx features enabled
749- const projectDoc = env . createMockProjectDoc ( PROJECT_ID , {
749+ const projectDoc = await env . createMockProjectDoc ( PROJECT_ID , {
750750 autoCorrectionsEnabled : false ,
751751 assessmentsEnabled : true ,
752752 punctuationCheckerEnabled : true ,
@@ -780,7 +780,7 @@ describe('LynxWorkspaceService', () => {
780780 flush ( ) ;
781781
782782 // Set up project with auto-corrections enabled
783- const projectDoc = env . createMockProjectDoc ( PROJECT_ID , {
783+ const projectDoc = await env . createMockProjectDoc ( PROJECT_ID , {
784784 autoCorrectionsEnabled : true ,
785785 assessmentsEnabled : false ,
786786 punctuationCheckerEnabled : true ,
@@ -819,7 +819,7 @@ describe('LynxWorkspaceService', () => {
819819 } ) ;
820820
821821 // Set up project with auto-corrections enabled
822- const projectDoc = env . createMockProjectDoc ( PROJECT_ID , {
822+ const projectDoc = await env . createMockProjectDoc ( PROJECT_ID , {
823823 autoCorrectionsEnabled : true ,
824824 assessmentsEnabled : false ,
825825 punctuationCheckerEnabled : true ,
@@ -857,12 +857,12 @@ describe('LynxWorkspaceService', () => {
857857 expect ( result ) . toEqual ( [ ] ) ;
858858 } ) ) ;
859859
860- it ( 'should return empty array when auto-corrections are disabled' , fakeAsync ( ( ) => {
860+ it ( 'should return empty array when auto-corrections are disabled' , fakeAsync ( async ( ) => {
861861 const env = new TestEnvironment ( ) ;
862862 env . service [ 'textDocId' ] = new TextDocId ( PROJECT_ID , BOOK_NUM , CHAPTER_NUM ) ;
863863
864864 // Create project with auto-corrections disabled
865- const projectDoc = env . createMockProjectDoc ( PROJECT_ID , {
865+ const projectDoc = await env . createMockProjectDoc ( PROJECT_ID , {
866866 autoCorrectionsEnabled : false ,
867867 assessmentsEnabled : false ,
868868 punctuationCheckerEnabled : false ,
@@ -882,7 +882,7 @@ describe('LynxWorkspaceService', () => {
882882 verify ( mockWorkspace . getOnTypeEdits ( anything ( ) , anything ( ) , anything ( ) ) ) . never ( ) ;
883883 } ) ) ;
884884
885- it ( 'should return edits when auto-corrections are enabled' , fakeAsync ( ( ) => {
885+ it ( 'should return edits when auto-corrections are enabled' , fakeAsync ( async ( ) => {
886886 const env = new TestEnvironment ( ) ;
887887
888888 env . setCustomWorkspaceMock ( ( workspaceMock : any ) => {
@@ -892,7 +892,7 @@ describe('LynxWorkspaceService', () => {
892892 } ) ;
893893
894894 // Create project with auto-corrections enabled
895- const projectDoc = env . createMockProjectDoc ( PROJECT_ID , {
895+ const projectDoc = await env . createMockProjectDoc ( PROJECT_ID , {
896896 autoCorrectionsEnabled : true ,
897897 assessmentsEnabled : false ,
898898 punctuationCheckerEnabled : true ,
@@ -940,7 +940,7 @@ describe('LynxWorkspaceService', () => {
940940 ) ;
941941 } ) ;
942942
943- const projectDoc = env . createMockProjectDoc ( PROJECT_ID , {
943+ const projectDoc = await env . createMockProjectDoc ( PROJECT_ID , {
944944 autoCorrectionsEnabled : true ,
945945 assessmentsEnabled : true ,
946946 punctuationCheckerEnabled : true ,
@@ -985,7 +985,7 @@ describe('LynxWorkspaceService', () => {
985985 flush ( ) ;
986986
987987 // Set up project with lynx features enabled
988- const projectDoc = env . createMockProjectDoc ( PROJECT_ID , {
988+ const projectDoc = await env . createMockProjectDoc ( PROJECT_ID , {
989989 autoCorrectionsEnabled : false ,
990990 assessmentsEnabled : true ,
991991 punctuationCheckerEnabled : true ,
@@ -1058,7 +1058,7 @@ describe('LynxWorkspaceService', () => {
10581058 flush ( ) ;
10591059
10601060 // Set up project with lynx features enabled
1061- const projectDoc = env . createMockProjectDoc ( PROJECT_ID , {
1061+ const projectDoc = await env . createMockProjectDoc ( PROJECT_ID , {
10621062 autoCorrectionsEnabled : false ,
10631063 assessmentsEnabled : true ,
10641064 punctuationCheckerEnabled : true ,
@@ -1146,7 +1146,7 @@ describe('LynxWorkspaceService', () => {
11461146 flush ( ) ;
11471147
11481148 // Set up project with lynx features enabled
1149- const projectDoc = env . createMockProjectDoc ( PROJECT_ID , {
1149+ const projectDoc = await env . createMockProjectDoc ( PROJECT_ID , {
11501150 autoCorrectionsEnabled : false ,
11511151 assessmentsEnabled : true ,
11521152 punctuationCheckerEnabled : true ,
@@ -1238,7 +1238,7 @@ describe('LynxWorkspaceService', () => {
12381238 flush ( ) ;
12391239
12401240 // Set up project with lynx features enabled
1241- const projectDoc = env . createMockProjectDoc ( PROJECT_ID , {
1241+ const projectDoc = await env . createMockProjectDoc ( PROJECT_ID , {
12421242 autoCorrectionsEnabled : false ,
12431243 assessmentsEnabled : true ,
12441244 punctuationCheckerEnabled : true ,
@@ -1306,7 +1306,7 @@ describe('LynxWorkspaceService', () => {
13061306 flush ( ) ;
13071307
13081308 // Set up project with lynx features enabled
1309- const projectDoc = env . createMockProjectDoc ( PROJECT_ID , {
1309+ const projectDoc = await env . createMockProjectDoc ( PROJECT_ID , {
13101310 autoCorrectionsEnabled : false ,
13111311 assessmentsEnabled : true ,
13121312 punctuationCheckerEnabled : true ,
0 commit comments