File tree Expand file tree Collapse file tree 2 files changed +2
-3
lines changed
packages/app/src/cli/services/bulk-operations Expand file tree Collapse file tree 2 files changed +2
-3
lines changed Original file line number Diff line number Diff line change @@ -69,7 +69,7 @@ describe('stageFile', () => {
6969 const uploadedBlob = fileAppendCall ?. [ 1 ] as Blob
7070 const uploadedContent = await uploadedBlob ?. text ( )
7171
72- expect ( uploadedContent ) . toBe ( '{"input":{"id":"gid://shopify/Product/123","tags":["test"]}}\n ' )
72+ expect ( uploadedContent ) . toBe ( '{"input":{"id":"gid://shopify/Product/123","tags":["test"]}}' )
7373 } )
7474
7575 test ( 'handles JSONL with multiple lines correctly' , async ( ) => {
@@ -94,7 +94,6 @@ describe('stageFile', () => {
9494 '{"input":{"id":"gid://shopify/Product/1","title":"New Shirt"}}' ,
9595 '{"input":{"id":"gid://shopify/Product/2","title":"Cool Pants"}}' ,
9696 '{"input":{"id":"gid://shopify/Product/3","title":"Nice Hat"}}' ,
97- '' ,
9897 ] . join ( '\n' )
9998
10099 expect ( uploadedContent ) . toBe ( expectedContent )
Original file line number Diff line number Diff line change @@ -18,7 +18,7 @@ interface StageFileOptions {
1818export async function stageFile ( options : StageFileOptions ) : Promise < string > {
1919 const { adminSession, variablesJsonl} = options
2020
21- const buffer = Buffer . from ( variablesJsonl ? ` ${ variablesJsonl } \n` : '' , 'utf-8' )
21+ const buffer = Buffer . from ( variablesJsonl ?? '' , 'utf-8' )
2222 const filename = 'bulk-variables.jsonl'
2323 const size = buffer . length
2424
You can’t perform that action at this time.
0 commit comments