-
-
Notifications
You must be signed in to change notification settings - Fork 102
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
Use yellow and red colors for suites with partial and no tests passing #129
Comments
Can I see your full output? Pass count is always green. Skipped is yellow because you purposefully write in If you skip enough tests that you have 0 tests running, I would justifiably say that's a green 0 and and 0 exit code. You wrote that in & it behaved accordingly |
full output 😅 from Astro Prettier Plugin |
It might make sense to add a warning message if someone runs a test suite containing only skips 🤔 but I would agree that passing on having all tests skip makes sense. |
You should move your test-utils file into your fixtures so that it's not being loaded. Also don't think you need to have |
I don't want to add a condition for such a rare and weird edge case tbh. Esp since the end result is expected and gonna be the same anyway. It feels like your tests aren't being awaited correctly, and that may be the test-utils causing things to freak out. Not at my computer but will have to check later |
|
Ah, so the reason why I'm getting "Passed: 0" with green output is Lines 130 to 143 in d56753e
Maybe there needs to be a time requirement or something? |
I've sorted out that https://github.com/snowpackjs/prettier-plugin-astro/blob/198bf46dd6b2ff5ecff9314ffadea2cf1db201a3/test/astro-prettier.test.js#L20-L27 seems to be the culprit - that test is failing in some way - commit 043a1070612eb2d38f14b3b0dbda03f986c8f49a messed things up
|
by altering the test to this: Prettier('can format a basic Astro file', async () => {
const [src, out] = await getFiles('basic');
assert.not.fixture(src, out);
console.log('before format');
try {
const formatted = format(src);
} catch (e) {
if (typeof e == 'Error') {
throw e;
}
throw new Error(e);
}
console.log('after format');
assert.fixture(formatted, out);
}); I can get the suite to run correctly.. I'm not sure why it's failing there. |
Can I close this? I don't really want to adjust the colorization & the actual issue you were running into is tracked by #130 |
Would it be possible to add color-coding to the test output, so that a test suite with zero passing tests doesn't output in green?
It took me a bit to figure out that this didn't say that all tests were passing 😅 you might respond with "just read" but I feel like the color is misleading?
Would it be possible to at least add a section in red for
Failed: X
?Thanks for the great tool btw!
The text was updated successfully, but these errors were encountered: