winglang / wing

A programming language for the cloud ☁️ A unified programming model, combining infrastructure and runtime code into one language ⚡
https://winglang.io
Other
5.06k stars 198 forks source link

fix(cli): not to show 1 test when no tests are in the file #7205

Closed ChihweiLHBird closed 2 weeks ago

ChihweiLHBird commented 3 weeks ago

This is to fix an issue that caused wing test against an empty some_file_name.w file shows Tests 1 passed (1).

See the issue #5852 for details.

Solution: Instead of adding a dummy pass message, the function now returns early with a predefined message when there's no test case to avoid confusion later.

And I don't think it would need full E2E tests?

I am still exploring how to add test for this new test system behavior. Will mark the PR as ready after adding/updating test for it.

Checklist

By submitting this pull request, I confirm that my contribution is made under the terms of the Wing Cloud Contribution License.

Resolves #5852

github-actions[bot] commented 3 weeks ago

Thanks for opening this pull request! :tada: Please consult the contributing guidelines for details on how to contribute to this project. If you need any assistance, don't hesitate to ping the relevant owner over Discord.

Topic Owner
Wing SDK and standard library @chriscbr
Wing Console @skyrpex
Wing compiler and language design @chriscbr
VSCode extension and language server @chriscbr
Wing CLI @chriscbr
Documentation @boyney123
Examples @boyney123
Wing Playground @skyrpex
eladb commented 3 weeks ago

@ChihweiLHBird thanks for this! Do you mind adding a few more details in the description on the bug itself and how this will look like after the fix?

ChihweiLHBird commented 3 weeks ago

Hi @eladb, thanks for the suggestion! This is just a draft PR and I will mark it as ready after adding those things.

Let me know if you have any feedback or anything, for example whether this is the right way to fix it, thanks! ^_^

ChihweiLHBird commented 3 weeks ago

Hey @eladb @Chriscbr, I think this PR is ready for reviews. And the CI reported a rate limiting error, should we try a re-run?

eladb commented 2 weeks ago

@ChihweiLHBird let us know if you need any help

ChihweiLHBird commented 2 weeks ago

@eladb Does it look good to you? Or any suggestion?

skyrpex commented 2 weeks ago

Thanks for your contribution! I'm having a look at the CI problem here 👀 ...

monadabot commented 2 weeks ago

:x: Unstable Self-Mutation :x:

Self-mutation has run twice in a row. There may be a something non-deterministic in the build or test process. Check the last mutation commit (97eca6abd033b27f2ee1b529798d89d12b368a70) for suspicious changes. This is typically caused by:

mergify[bot] commented 2 weeks ago

Thanks for contributing, @ChihweiLHBird! This PR will now be added to the merge queue, or immediately merged if zhiwei/fix-no-tests-1-count is up-to-date with main and the queue is empty.

monadabot commented 2 weeks ago

Congrats! :rocket: This was released in Wing 0.85.32.