Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add --hide-traces flag to deno test to ignore the stack trace completely #24002

Open
carafelix opened this issue May 28, 2024 · 0 comments · May be fixed by #24095
Open

add --hide-traces flag to deno test to ignore the stack trace completely #24002

carafelix opened this issue May 28, 2024 · 0 comments · May be fixed by #24095
Labels
suggestion suggestions for new features (yet to be agreed)

Comments

@carafelix
Copy link

carafelix commented May 28, 2024

I been using deno test in the simple describe > it fashion, and it's alright. The only downside I've encounter is when multiple test's are failing, it gets cluttered real quickly with long stack traces. When writing good describe-it combinations I already now where and what failed, so it's not necessary that whole stack trace. Adding -q flag won't help it.
Current:

describe it description yara yara
error: AssertionError: Values are not equal.


    [Diff] Actual / Expected


-   undefined
+   "poussar"                   <-- up to here would be okay some times :) 

  throw new AssertionError(message);
        ^
    at assertEquals (https://deno.land/std@0.203.0/assert/assert_equals.ts:53:9)
    at Object.<anonymous> (file:///media/martincito/freedom/repos/grammy/commands/test/jaroWrinkler.test.ts:169:21)
    at Function.runTest (https://deno.land/std@0.203.0/testing/_test_suite.ts:358:16)
    at Function.runTest (https://deno.land/std@0.203.0/testing/_test_suite.ts:346:33)
    at Function.runTest (https://deno.land/std@0.203.0/testing/_test_suite.ts:346:33)
    at Function.runTest (https://deno.land/std@0.203.0/testing/_test_suite.ts:346:33)
    at Function.runTest (https://deno.land/std@0.203.0/testing/_test_suite.ts:346:33)
    at fn (https://deno.land/std@0.203.0/testing/_test_suite.ts:316:37)

#13586 and #14921 mention shortening the stack trace. I would like a flag to completely remove it.
Desired:

describe it description yara yara
error: AssertionError: Values are not equal.


    [Diff] Actual / Expected


-   undefined
+   "poussar"

Call it --hide-traces or --hide-stack-trace or whatever you wanna call it, but as of rn its too much visual noise. Thanks

@marvinhagemeister marvinhagemeister added the suggestion suggestions for new features (yet to be agreed) label May 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
suggestion suggestions for new features (yet to be agreed)
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants