File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -157,7 +157,11 @@ describe("Ocean CLI Free Compute Flow", function () {
157157
158158 let jobs ;
159159 try {
160- jobs = JSON . parse ( jsonMatch [ 0 ] ) ;
160+ const jsonStr = jsonMatch [ 0 ]
161+ . replace ( / ( [ { , ] \s * ) ' ( [ ^ ' ] + ?) ' \s * : / g, '$1"$2":' )
162+ . replace ( / : \s * ' ( [ ^ ' ] * ?) ' / g, ': "$1"' ) ;
163+
164+ jobs = JSON . parse ( jsonStr ) ;
161165 } catch ( e ) {
162166 console . warn ( "Failed to parse job status JSON, will retry..." ) ;
163167 await new Promise ( ( res ) => setTimeout ( res , pollIntervalMs ) ) ;
@@ -182,9 +186,7 @@ describe("Ocean CLI Free Compute Flow", function () {
182186 `Job ${ jobId } did not finish within ${ maxWaitMs / 1000 } seconds`
183187 ) ;
184188 } ;
185-
186189 it ( "should download compute job results" , async ( ) => {
187- // Wait for job to finish and get job details
188190 const job = await waitForJobCompletion (
189191 computeDatasetDid ,
190192 jobId ,
You can’t perform that action at this time.
0 commit comments