@@ -49,7 +49,9 @@ describe('linkedAppContext', () => {
4949 test ( 'returns linked app context when app is already linked' , async ( ) => {
5050 await inTemporaryDirectory ( async ( tmp ) => {
5151 // Given
52- const content = `client_id="test-api-key"`
52+ const content = `
53+ name = "test-app"
54+ client_id="test-api-key"`
5355 await writeAppConfig ( tmp , content )
5456
5557 // When
@@ -65,6 +67,7 @@ describe('linkedAppContext', () => {
6567 app : expect . objectContaining ( {
6668 configuration : {
6769 client_id : 'test-api-key' ,
70+ name : 'test-app' ,
6871 path : normalizePath ( joinPath ( tmp , 'shopify.app.toml' ) ) ,
6972 } ,
7073 } ) ,
@@ -98,7 +101,10 @@ describe('linkedAppContext', () => {
98101 configurationPath : `${ tmp } /shopify.app.stg.toml` ,
99102 configSource : 'cached' ,
100103 configurationFileName : 'shopify.app.stg.toml' ,
101- basicConfiguration : { client_id : 'test-api-key' , path : normalizePath ( joinPath ( tmp , 'shopify.app.stg.toml' ) ) } ,
104+ basicConfiguration : {
105+ client_id : 'test-api-key' ,
106+ path : normalizePath ( joinPath ( tmp , 'shopify.app.stg.toml' ) ) ,
107+ } ,
102108 } ,
103109 configuration : {
104110 client_id : 'test-api-key' ,
@@ -133,7 +139,9 @@ describe('linkedAppContext', () => {
133139 await inTemporaryDirectory ( async ( tmp ) => {
134140 // Given
135141 vi . mocked ( appFromIdentifiers ) . mockResolvedValue ( { ...mockRemoteApp , apiKey : 'test-api-key-new' } )
136- const content = `client_id="test-api-key-new"`
142+ const content = `
143+ name = "test-app"
144+ client_id="test-api-key-new"`
137145 await writeAppConfig ( tmp , content )
138146 localStorage . setCachedAppInfo ( {
139147 appId : 'test-api-key-old' ,
@@ -166,7 +174,9 @@ describe('linkedAppContext', () => {
166174 test ( 'uses provided clientId when available and updates the app configuration' , async ( ) => {
167175 await inTemporaryDirectory ( async ( tmp ) => {
168176 // Given
169- const content = `client_id="test-api-key"`
177+ const content = `
178+ name = "test-app"
179+ client_id="test-api-key"`
170180 await writeAppConfig ( tmp , content )
171181 const newClientId = 'new-api-key'
172182
@@ -191,7 +201,9 @@ describe('linkedAppContext', () => {
191201 test ( 'resets app when there is a valid toml but reset option is true' , async ( ) => {
192202 await inTemporaryDirectory ( async ( tmp ) => {
193203 // Given
194- const content = `client_id="test-api-key"`
204+ const content = `
205+ name = "test-app"
206+ client_id="test-api-key"`
195207 await writeAppConfig ( tmp , content )
196208
197209 vi . mocked ( link ) . mockResolvedValue ( {
@@ -202,7 +214,10 @@ describe('linkedAppContext', () => {
202214 configurationPath : `${ tmp } /shopify.app.toml` ,
203215 configSource : 'cached' ,
204216 configurationFileName : 'shopify.app.toml' ,
205- basicConfiguration : { client_id : 'test-api-key' , path : normalizePath ( joinPath ( tmp , 'shopify.app.toml' ) ) } ,
217+ basicConfiguration : {
218+ client_id : 'test-api-key' ,
219+ path : normalizePath ( joinPath ( tmp , 'shopify.app.toml' ) ) ,
220+ } ,
206221 } ,
207222 configuration : {
208223 client_id : 'test-api-key' ,
@@ -229,7 +244,9 @@ describe('linkedAppContext', () => {
229244 test ( 'logs metadata' , async ( ) => {
230245 await inTemporaryDirectory ( async ( tmp ) => {
231246 // Given
232- const content = `client_id="test-api-key"`
247+ const content = `
248+ name = "test-app"
249+ client_id="test-api-key"`
233250 await writeAppConfig ( tmp , content )
234251
235252 // When
@@ -255,7 +272,9 @@ describe('linkedAppContext', () => {
255272 test ( 'uses unsafeReportMode when provided' , async ( ) => {
256273 await inTemporaryDirectory ( async ( tmp ) => {
257274 // Given
258- const content = `client_id="test-api-key"`
275+ const content = `
276+ name = "test-app"
277+ client_id="test-api-key"`
259278 await writeAppConfig ( tmp , content )
260279 const loadSpy = vi . spyOn ( loader , 'loadAppUsingConfigurationState' )
261280
@@ -278,7 +297,9 @@ describe('linkedAppContext', () => {
278297 test ( 'does not use unsafeReportMode when not provided' , async ( ) => {
279298 await inTemporaryDirectory ( async ( tmp ) => {
280299 // Given
281- const content = `client_id="test-api-key"`
300+ const content = `
301+ name = "test-app"
302+ client_id="test-api-key"`
282303 await writeAppConfig ( tmp , content )
283304 const loadSpy = vi . spyOn ( loader , 'loadAppUsingConfigurationState' )
284305
0 commit comments