@@ -737,7 +737,8 @@ describe("ReplaneContext with async prop", () => {
737737
738738 // Store for use in tests
739739 ( globalThis as Record < string , unknown > ) . __TestAsyncProvider = TestAsyncProvider ;
740- ( globalThis as Record < string , unknown > ) . __TestAsyncProviderWithConfig = TestAsyncProviderWithConfig ;
740+ ( globalThis as Record < string , unknown > ) . __TestAsyncProviderWithConfig =
741+ TestAsyncProviderWithConfig ;
741742
742743 mockClient = createMockClient ( { feature : "default-value" } ) ;
743744 const connectPromise = new Promise < void > ( ( resolve , reject ) => {
@@ -754,7 +755,8 @@ describe("ReplaneContext with async prop", () => {
754755 } ) ;
755756
756757 it ( "renders children immediately without waiting for connection" , async ( ) => {
757- const TestAsyncProvider = ( globalThis as Record < string , unknown > ) . __TestAsyncProvider as typeof import ( "./components/TestAsyncProvider.svelte" ) . default ;
758+ const TestAsyncProvider = ( globalThis as Record < string , unknown > )
759+ . __TestAsyncProvider as typeof import ( "./components/TestAsyncProvider.svelte" ) . default ;
758760
759761 render ( TestAsyncProvider , {
760762 props : {
@@ -768,7 +770,8 @@ describe("ReplaneContext with async prop", () => {
768770 } ) ;
769771
770772 it ( "creates client with defaults" , async ( ) => {
771- const TestAsyncProvider = ( globalThis as Record < string , unknown > ) . __TestAsyncProvider as typeof import ( "./components/TestAsyncProvider.svelte" ) . default ;
773+ const TestAsyncProvider = ( globalThis as Record < string , unknown > )
774+ . __TestAsyncProvider as typeof import ( "./components/TestAsyncProvider.svelte" ) . default ;
772775
773776 const defaults = { feature : "my-default" } ;
774777
@@ -787,7 +790,8 @@ describe("ReplaneContext with async prop", () => {
787790 } ) ;
788791
789792 it ( "connects in the background after render" , async ( ) => {
790- const TestAsyncProvider = ( globalThis as Record < string , unknown > ) . __TestAsyncProvider as typeof import ( "./components/TestAsyncProvider.svelte" ) . default ;
793+ const TestAsyncProvider = ( globalThis as Record < string , unknown > )
794+ . __TestAsyncProvider as typeof import ( "./components/TestAsyncProvider.svelte" ) . default ;
791795
792796 render ( TestAsyncProvider , {
793797 props : {
@@ -813,7 +817,8 @@ describe("ReplaneContext with async prop", () => {
813817 } ) ;
814818
815819 it ( "allows config to retrieve default values immediately" , async ( ) => {
816- const TestAsyncProviderWithConfig = ( globalThis as Record < string , unknown > ) . __TestAsyncProviderWithConfig as typeof import ( "./components/TestAsyncProviderWithConfig.svelte" ) . default ;
820+ const TestAsyncProviderWithConfig = ( globalThis as Record < string , unknown > )
821+ . __TestAsyncProviderWithConfig as typeof import ( "./components/TestAsyncProviderWithConfig.svelte" ) . default ;
817822
818823 render ( TestAsyncProviderWithConfig , {
819824 props : {
@@ -827,7 +832,8 @@ describe("ReplaneContext with async prop", () => {
827832 } ) ;
828833
829834 it ( "updates values when connection succeeds and server sends new values" , async ( ) => {
830- const TestAsyncProviderWithConfig = ( globalThis as Record < string , unknown > ) . __TestAsyncProviderWithConfig as typeof import ( "./components/TestAsyncProviderWithConfig.svelte" ) . default ;
835+ const TestAsyncProviderWithConfig = ( globalThis as Record < string , unknown > )
836+ . __TestAsyncProviderWithConfig as typeof import ( "./components/TestAsyncProviderWithConfig.svelte" ) . default ;
831837
832838 render ( TestAsyncProviderWithConfig , {
833839 props : {
@@ -854,7 +860,8 @@ describe("ReplaneContext with async prop", () => {
854860 } ) ;
855861
856862 it ( "logs error when connection fails but does not throw" , async ( ) => {
857- const TestAsyncProvider = ( globalThis as Record < string , unknown > ) . __TestAsyncProvider as typeof import ( "./components/TestAsyncProvider.svelte" ) . default ;
863+ const TestAsyncProvider = ( globalThis as Record < string , unknown > )
864+ . __TestAsyncProvider as typeof import ( "./components/TestAsyncProvider.svelte" ) . default ;
858865
859866 const mockLogger = {
860867 error : vi . fn ( ) ,
@@ -892,7 +899,8 @@ describe("ReplaneContext with async prop", () => {
892899 } ) ;
893900
894901 it ( "uses console.error when no logger provided and connection fails" , async ( ) => {
895- const TestAsyncProvider = ( globalThis as Record < string , unknown > ) . __TestAsyncProvider as typeof import ( "./components/TestAsyncProvider.svelte" ) . default ;
902+ const TestAsyncProvider = ( globalThis as Record < string , unknown > )
903+ . __TestAsyncProvider as typeof import ( "./components/TestAsyncProvider.svelte" ) . default ;
896904
897905 const consoleSpy = vi . spyOn ( console , "error" ) . mockImplementation ( ( ) => { } ) ;
898906
@@ -917,7 +925,8 @@ describe("ReplaneContext with async prop", () => {
917925 } ) ;
918926
919927 it ( "does not connect when connection is null" , async ( ) => {
920- const TestAsyncProvider = ( globalThis as Record < string , unknown > ) . __TestAsyncProvider as typeof import ( "./components/TestAsyncProvider.svelte" ) . default ;
928+ const TestAsyncProvider = ( globalThis as Record < string , unknown > )
929+ . __TestAsyncProvider as typeof import ( "./components/TestAsyncProvider.svelte" ) . default ;
921930
922931 render ( TestAsyncProvider , {
923932 props : {
@@ -936,7 +945,8 @@ describe("ReplaneContext with async prop", () => {
936945 } ) ;
937946
938947 it ( "works with context prop for override evaluations" , async ( ) => {
939- const TestAsyncProvider = ( globalThis as Record < string , unknown > ) . __TestAsyncProvider as typeof import ( "./components/TestAsyncProvider.svelte" ) . default ;
948+ const TestAsyncProvider = ( globalThis as Record < string , unknown > )
949+ . __TestAsyncProvider as typeof import ( "./components/TestAsyncProvider.svelte" ) . default ;
940950
941951 const context = { userId : "user-123" , plan : "premium" } ;
942952
@@ -1071,10 +1081,8 @@ describe("Additional Edge Cases", () => {
10711081 } ) ;
10721082
10731083 it ( "handles config with connection: null" , async ( ) => {
1074- // eslint-disable-next-line @typescript-eslint/no-explicit-any
1075- let mockReplaneClass : any ;
10761084 const mockClient = createMockClient ( { feature : "default-value" } ) ;
1077- mockReplaneClass = vi . spyOn ( sdk , "Replane" ) . mockImplementation ( ( ) => mockClient ) ;
1085+ const mockReplaneClass = vi . spyOn ( sdk , "Replane" ) . mockImplementation ( ( ) => mockClient ) ;
10781086
10791087 const TestAsyncProvider = ( await import ( "./components/TestAsyncProvider.svelte" ) ) . default ;
10801088
0 commit comments