Skip to content

Commit 825d575

Browse files
committed
Updated test.
1 parent f43f3ba commit 825d575

1 file changed

Lines changed: 10 additions & 10 deletions

File tree

test/computeFlow.test.ts

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -106,10 +106,10 @@ describe("Ocean CLI Compute", function() {
106106
}
107107

108108
try {
109-
expect(jsonMatch).to.contain("Resolving Asset with DID:")
110-
expect(jsonMatch).to.contain(`id: '${computeDatasetDid}'`)
111-
expect(jsonMatch).to.contain(`'@context': [ 'https://w3id.org/did/v1' ]`)
112-
expect(jsonMatch).to.contain('indexedMetadata')
109+
expect(output).to.contain("Resolving Asset with DID:")
110+
expect(output).to.contain(`id: '${computeDatasetDid}'`)
111+
expect(output).to.contain(`'@context': [ 'https://w3id.org/did/v1' ]`)
112+
expect(output).to.contain('indexedMetadata')
113113
} catch (error) {
114114
console.error("Extracted output:", jsonMatch[0]);
115115
throw new Error("Failed to parse the extracted output:\n" + error);
@@ -126,10 +126,10 @@ describe("Ocean CLI Compute", function() {
126126
}
127127

128128
try {
129-
expect(jsonMatch).to.contain("Resolving Asset with DID:")
130-
expect(jsonMatch).to.contain(`id: '${jsAlgoDid}'`)
131-
expect(jsonMatch).to.contain(`'@context': [ 'https://w3id.org/did/v1' ]`)
132-
expect(jsonMatch).to.contain('indexedMetadata')
129+
expect(output).to.contain("Resolving Asset with DID:")
130+
expect(output).to.contain(`id: '${jsAlgoDid}'`)
131+
expect(output).to.contain(`'@context': [ 'https://w3id.org/did/v1' ]`)
132+
expect(output).to.contain('indexedMetadata')
133133
} catch (error) {
134134
console.error("Extracted output:", jsonMatch[0]);
135135
throw new Error("Failed to parse the extracted output:\n" + error);
@@ -212,9 +212,9 @@ describe("Ocean CLI Compute", function() {
212212

213213
let jobId;
214214
try {
215-
jobId = eval(`(${jsonMatch[1]})`);
215+
jobId = eval(`(${jsonMatch[0]})`);
216216
} catch (error) {
217-
console.error("Extracted output:", jsonMatch[1]);
217+
console.error("Extracted output:", jsonMatch[0]);
218218
throw new Error("Failed to parse the extracted output:\n" + error);
219219
}
220220
computeJobId = jobId

0 commit comments

Comments
 (0)