diff --git a/CodeExamples.md b/CodeExamples.md index a385b17e..1a231d60 100644 --- a/CodeExamples.md +++ b/CodeExamples.md @@ -20,7 +20,11 @@ import { downloadFile } from '../../src' import { ProviderFees, Erc20CreateParams } from '../../src/@types' +``` +We will need a file to publish, so here we define the file that we intend to publish. + +```Typescript const assetUrl = [ { type: 'url', @@ -28,6 +32,10 @@ const assetUrl = [ method: 'GET' } ] +``` + +Next, we define the metadata that will describe our data asset. This is what we call the DDO +```Typescript const ddo = { '@context': ['https://w3id.org/did/v1'], id: 'did:op:efba17455c127a885ec7830d687a8f6e64f5ba559f8506f8723c1f10f05c049c', @@ -58,8 +66,10 @@ const ddo = { } ] } +``` + +```Typescript -## Simple Publish & consume test let config: Config let addresses: any let aquarius: Aquarius @@ -175,3 +185,4 @@ const ddo = { } }) }) +``` diff --git a/scripts/createGuide.sh b/scripts/createGuide.sh index 89381b2e..f49ba53a 100755 --- a/scripts/createGuide.sh +++ b/scripts/createGuide.sh @@ -12,7 +12,7 @@ sed -i 's/\/\/\/ //' CodeExamples.md # Generate titles -sed -i "s/describe('/\#\# /" CodeExamples.md +sed -i "s/describe('Simple Publish & Consume Flow', async () => {//" CodeExamples.md sed -i "s/it('/\#\#\# /" CodeExamples.md sed -i "s/', async () => {//" CodeExamples.md sed -i "s/before(async () => {//" CodeExamples.md diff --git a/test/integration/ReadmeFlow.test.ts b/test/integration/ReadmeFlow.test.ts index 5b6da188..99977526 100644 --- a/test/integration/ReadmeFlow.test.ts +++ b/test/integration/ReadmeFlow.test.ts @@ -20,7 +20,11 @@ import { downloadFile } from '../../src' import { ProviderFees, Erc20CreateParams } from '../../src/@types' +/// ``` +/// We will need a file to publish, so here we define the file that we intend to publish. + +/// ```Typescript const assetUrl = [ { type: 'url', @@ -28,6 +32,10 @@ const assetUrl = [ method: 'GET' } ] +/// ``` + +/// Next, we define the metadata that will describe our data asset. This is what we call the DDO +/// ```Typescript const ddo = { '@context': ['https://w3id.org/did/v1'], id: 'did:op:efba17455c127a885ec7830d687a8f6e64f5ba559f8506f8723c1f10f05c049c', @@ -58,8 +66,10 @@ const ddo = { } ] } +/// ``` -describe('Simple Publish & consume test', async () => { +/// ```Typescript +describe('Simple Publish & Consume Flow', async () => { let config: Config let addresses: any let aquarius: Aquarius @@ -175,3 +185,4 @@ describe('Simple Publish & consume test', async () => { } }) }) +/// ```