Skip to content

Commit

Permalink
test(examples): fixed examples
Browse files Browse the repository at this point in the history
  • Loading branch information
mgordel committed Sep 20, 2023
1 parent 9032f3a commit 6158a74
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 3 deletions.
2 changes: 2 additions & 0 deletions examples/docs-examples/examples/using-app-keys/index.mjs
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
import { TaskExecutor } from "@golem-sdk/golem-js";

(async () => {
const executor = await TaskExecutor.create({
package: "529f7fdaf1cf46ce3126eb6bbcd3b213c314fe8fe884914f5d1106d4",
Expand Down
4 changes: 2 additions & 2 deletions tests/examples/examples.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,9 @@
{ "cmd": "node", "path": "examples/docs-examples/examples/executing-tasks/max-parallel-tasks.mjs" },
{ "cmd": "node", "path": "examples/docs-examples/examples/executing-tasks/single-run.mjs" },

{ "cmd": "node", "path": "examples/docs-examples/examples/selecting-providers/custom-price.mjs" },
{ "cmd": "node", "path": "examples/docs-examples/examples/selecting-providers/custom-price.mjs", "noGoth": true },
{ "cmd": "node", "path": "examples/docs-examples/examples/selecting-providers/demand.mjs" },
{ "cmd": "node", "path": "examples/docs-examples/examples/selecting-providers/whitelist.mjs" },
{ "cmd": "node", "path": "examples/docs-examples/examples/selecting-providers/whitelist.mjs", "noGoth": true },

{ "cmd": "node", "path": "examples/docs-examples/examples/sending-data/downloading-file.mjs" },
{ "cmd": "node", "path": "examples/docs-examples/examples/sending-data/upoading-file.mjs" },
Expand Down
3 changes: 2 additions & 1 deletion tests/examples/examples.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,8 @@ async function test(cmd: string, path: string, args: string[] = [], timeout = 18
}
});
spawnedExample.on("close", (code) => {
if (!error && code === 0) return res(true);
console.log("EXIT CODE", code);
if (!error) return res(true);
rej(`Test example "${file}" failed. ${error}`);
});
}).finally(() => {
Expand Down

0 comments on commit 6158a74

Please sign in to comment.