From 7224ae459779f549866fa2788ee151f7df4374b2 Mon Sep 17 00:00:00 2001 From: timbrinded <79199034+timbrinded@users.noreply.github.com> Date: Wed, 22 Nov 2023 13:49:15 +0000 Subject: [PATCH] removed logging --- packages/cli/src/cmds/entrypoint.ts | 1 + packages/cli/src/cmds/runTests.ts | 4 +--- packages/cli/src/internal/localNode.ts | 1 - packages/cli/src/lib/globalContextEffect.ts | 2 -- packages/cli/src/lib/runnerContext.ts | 6 ------ test/suites/basic/test_basic.ts | 2 +- 6 files changed, 3 insertions(+), 13 deletions(-) diff --git a/packages/cli/src/cmds/entrypoint.ts b/packages/cli/src/cmds/entrypoint.ts index 2a5bc4ef..e2c915ff 100755 --- a/packages/cli/src/cmds/entrypoint.ts +++ b/packages/cli/src/cmds/entrypoint.ts @@ -177,6 +177,7 @@ const cliStart = Effect.gen(function* (_) { case "test": { yield* _( testEffect(args["envName"], { testNamePattern: args["GrepTest"] }).pipe( + Effect.tap(() => Effect.sync(() => console.log("✅ All Tests Passed"))), Effect.catchTag("TestsFailedError", (error) => { failedTests = error.fails; return Effect.succeed( diff --git a/packages/cli/src/cmds/runTests.ts b/packages/cli/src/cmds/runTests.ts index 9a937b74..e99e246d 100644 --- a/packages/cli/src/cmds/runTests.ts +++ b/packages/cli/src/cmds/runTests.ts @@ -51,9 +51,7 @@ export const testEffect = (envName: string, additionalArgs?: object) => { Effect.sync(() => vitest!.state.getFiles().filter((file) => file.result!.state === "fail")) ); - if (failed.length === 0) { - yield* _(Effect.succeed(() => console.log("✅ All tests passed"))); - } else { + if (failed.length !== 0) { yield* _(new Err.TestsFailedError({ fails: failed.length })); } }); diff --git a/packages/cli/src/internal/localNode.ts b/packages/cli/src/internal/localNode.ts index 79bf8660..de898a38 100644 --- a/packages/cli/src/internal/localNode.ts +++ b/packages/cli/src/internal/localNode.ts @@ -54,7 +54,6 @@ export const launchNodeEffect = (cmd: string, args: string[]) => } } } - console.log("this is runningNode.pid", runningNode.pid); return { pid: runningNode.pid, kill: runningNode.kill } satisfies LaunchedNode; }); diff --git a/packages/cli/src/lib/globalContextEffect.ts b/packages/cli/src/lib/globalContextEffect.ts index 45775cd5..d4b53622 100644 --- a/packages/cli/src/lib/globalContextEffect.ts +++ b/packages/cli/src/lib/globalContextEffect.ts @@ -327,8 +327,6 @@ export class MoonwallContext { const promises = nodes.map(async ({ cmd, args, launch }) => { if (launch) { const result = await Effect.runPromise(launchNodeEffect(cmd, args)); - console.log("result pushed"); - console.log(result); this.nodes.push(result); } else { return Promise.resolve(); diff --git a/packages/cli/src/lib/runnerContext.ts b/packages/cli/src/lib/runnerContext.ts index 71eabff1..c5c519e2 100644 --- a/packages/cli/src/lib/runnerContext.ts +++ b/packages/cli/src/lib/runnerContext.ts @@ -83,7 +83,6 @@ export function describeSuite({ let ctx: any; beforeAll(async function () { - console.log("this is before runner"); const effect = Effect.gen(function* (_) { const globalConfig = yield* _( Effect.tryPromise({ @@ -104,12 +103,9 @@ export function describeSuite({ }); ctx = await Effect.runPromise(effect); - console.log("Nodes in this instance are:"); - console.log(ctx.nodes); }); afterAll(async function () { - console.log("This is after all runner"); const effect = ctx.destroyEffect().pipe( Effect.timeoutFail({ duration: "10 seconds", @@ -118,8 +114,6 @@ export function describeSuite({ ); await Effect.runPromise(effect); - console.log("Nodes leftover are:"); - console.log(ctx.nodes); ctx = null; }); diff --git a/test/suites/basic/test_basic.ts b/test/suites/basic/test_basic.ts index fd4b9960..3ef6afdd 100644 --- a/test/suites/basic/test_basic.ts +++ b/test/suites/basic/test_basic.ts @@ -16,7 +16,7 @@ describeSuite({ id: "T01", title: "This is a bool test case", test: function () { - expect(true).to.be.true; + expect(false).to.be.true; }, });