Skip to content

Commit

Permalink
Test lint in E2E tests
Browse files Browse the repository at this point in the history
  • Loading branch information
N2D4 committed Aug 3, 2024
1 parent 0306a5b commit 5c188ee
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 1 deletion.
14 changes: 14 additions & 0 deletions apps/e2e/tests/general/lint.test.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
import { exec } from "child_process";
import { describe } from "vitest";
import { it } from "../helpers";

describe("`pnpm run lint`", () => {
it("completes successfully", async ({ expect }) => {
const [error, stdout, stderr] = await new Promise<[Error | null, string, string]>((resolve) => {
exec("pnpm run lint", (error, stdout, stderr) => {
resolve([error, stdout, stderr]);
});
});
expect(error, `Expected no error to be thrown!\n\n\n\nstdout: ${stdout}\n\n\n\nstderr: ${stderr}`).toBeNull();
}, 60_000);
});
2 changes: 1 addition & 1 deletion apps/e2e/tests/general/typecheck.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,5 @@ describe("`pnpm run typecheck`", () => {
});
});
expect(error, `Expected no error to be thrown!\n\n\n\nstdout: ${stdout}\n\n\n\nstderr: ${stderr}`).toBeNull();

Check failure on line 12 in apps/e2e/tests/general/typecheck.test.ts

View workflow job for this annotation

GitHub Actions / build (20.x)

tests/general/typecheck.test.ts > `pnpm run typecheck` > completes successfully

AssertionError: Expected no error to be thrown! stdout: > @stackframe/monorepo@0.0.0 typecheck /home/runner/work/stack/stack > only-allow pnpm && turbo typecheck • Packages in scope: @stackframe/docs, @stackframe/docs-examples, @stackframe/e-commerce-demo, @stackframe/e2e-tests, @stackframe/example-cjs-test, @stackframe/example-demo-app, @stackframe/example-middleware-demo, @stackframe/example-partial-prerendering, @stackframe/init-stack, @stackframe/oauth-mock-server, @stackframe/stack, @stackframe/stack-backend, @stackframe/stack-dashboard, @stackframe/stack-emails, @stackframe/stack-sc, @stackframe/stack-shared, @stackframe/stack-ui • Running typecheck in 17 packages • Remote caching disabled ::group::@stackframe/oauth-mock-server:typecheck cache bypass, force executing 5828940c30455a93 > @stackframe/oauth-mock-server@2.5.15 typecheck /home/runner/work/stack/stack/apps/oauth-mock-server > tsc --noEmit ::endgroup:: @stackframe/example-cjs-test:typecheck cache bypass, force executing 1960d3225d3924bc > @stackframe/example-cjs-test@2.5.15 typecheck /home/runner/work/stack/stack/examples/cjs-test > tsc --noEmit app/handler/[...stack]/page.tsx(5,11): error TS2786: 'StackHandler' cannot be used as a JSX component. Its type '<HasTokenStore extends boolean>({ app, params: { stack }, searchParams, fullPage, }: { app: StackServerApp<HasTokenStore>; params?: { stack?: string[] | undefined; } | undefined; searchParams?: Record<string, string> | undefined; fullPage?: boolean | undefined; }) => Promise<Element>' is not a valid JSX element type. Type '<HasTokenStore extends boolean>({ app, params: { stack }, searchParams, fullPage, }: { app: StackServerApp<HasTokenStore>; params?: { stack?: string[] | undefined; } | undefined; searchParams?: Record<string, string> | undefined; fullPage?: boolean | undefined; }) => Promise<Element>' is not assignable to type '(props: any, deprecatedLegacyContext?: any) => ReactNode'. Type 'Promise<Element>' is not assignable to type 'ReactNode'.  ELIFECYCLE  Command failed with exit code 2. [ERROR] command finished with error: command (/home/runner/work/stack/stack/examples/cjs-test) /home/runner/setup-pnpm/node_modules/.bin/pnpm run typecheck exited (2) ::group::@stackframe/example-middleware-demo:typecheck cache bypass, force executing cf258c36e17721f7 ::endgroup:: ::group::@stackframe/stack-sc:typecheck cache bypass, force executing 83a1d60efdf04066 ::endgroup:: ::group::@stackframe/stack-backend:typecheck cache bypass, force executing 0bd053b5af11b278 ::endgroup:: ::group::@stackframe/docs-examples:typecheck cache bypass, force executing bf2d0254e9ad430d ::endgroup:: ::group::@stackframe/stack-emails:typecheck cache bypass, force executing 3dbd6252d62c5aba ::endgroup:: ::group::@stackframe/example-demo-app:typecheck cache bypass, force executing c97ae5166703168c > @stackframe/example-demo-app@2.5.15 typecheck /home/runner/work/stack/stack/examples/demo > tsc --noEmit ::endgroup:: ::group::@stackframe/stack:typecheck cache bypass, force executing 4b26cf1cd97754e1 > @stackframe/stack@2.5.15 typecheck /home/runner/work/stack/stack/packages/stack > tsc --noEmit ::endgroup:: ::group::@stackframe/e2e-tests:typecheck cache bypass, force executing a946725c95181712 > @stackframe/e2e-tests@2.5.15 typecheck /home/runner/work/stack/stack/apps/e2e > tsc --noEmit ::endgroup:: ::group::@stackframe/stack-dashboard:typecheck cache bypass, force executing 215a62f63ccfebc5 > @stackframe/stack-dashboard@2.5.15 typecheck /home/runner/work/stack/stack/apps/dashboard > tsc --noEmit ::endgroup:: ::group::@stackframe/stack-ui:typecheck cache bypass, force executing 654a351527af51ab > @stackframe/stack-ui@2.5.15 typecheck /home/runner/work/stack/stack/packages/stack-ui > tsc --noEmit ::endgroup:: ::group::@stackframe/stack-shared:typecheck cache bypass, force executing 2c26d3385186565a > @stackframe/stack-shared@2.5.15 typecheck /home/runner/work/stack/stack/packages/stack-shared > tsc --noEmit ::endgroup:: ::group::@stackframe/example-partial-prerendering:typecheck cache bypass, force exe
});
}, 60_000);
});

0 comments on commit 5c188ee

Please sign in to comment.