Skip to content

Stabilize emoji use in tests#194

Open
kenoss wants to merge 1 commit into
chawyehsu:mainfrom
kenoss:env-lang-utf8
Open

Stabilize emoji use in tests#194
kenoss wants to merge 1 commit into
chawyehsu:mainfrom
kenoss:env-lang-utf8

Conversation

@kenoss

@kenoss kenoss commented Jun 27, 2026

Copy link
Copy Markdown
Contributor

Depends on #188 (merged)


Before this patch, some test results were unstable:

    4       │-✔ Default toolchain set to version 'latest'
          4 │+Default toolchain set to version 'latest'

This is because console crate uses LANG for check that we should use
emoji or not.
https://github.com/console-rs/console/blob/0.16.3/src/unix_term.rs#L389-L396

To stabilize the results, this patch adds the environment variable
LANG for tests.

@coderabbitai

coderabbitai Bot commented Jun 27, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 6a24c4f8-bc65-42e5-811d-0f9e944f07e9

📥 Commits

Reviewing files that changed from the base of the PR and between 266f253 and 60ba58a.

📒 Files selected for processing (1)
  • pixi.toml

Summary by CodeRabbit

  • Chores
    • Updated test commands to run with a consistent English UTF-8 locale during snapshot review.
    • Existing test output settings remain the same, including the dedicated test target directory and all-features variant.

Walkthrough

The pixi.toml file's test and test-all tasks were updated to inject LANG = "en_US.UTF-8" into the environment for cargo insta test --review executions, alongside the existing CARGO_TARGET_DIR = "target/insta" setting.

Changes

pixi.toml task environment update

Layer / File(s) Summary
Add LANG environment variable to insta test tasks
pixi.toml
The test and test-all tasks now set LANG = "en_US.UTF-8" in addition to CARGO_TARGET_DIR = "target/insta" for cargo insta test --review runs.

Possibly related PRs

  • chawyehsu/moonup#188: Both PRs modify the same pixi.toml test/test-all tasks for cargo insta test --review, adding environment variables (CARGO_TARGET_DIR versus LANG).

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@stage-review

stage-review Bot commented Jun 29, 2026

Copy link
Copy Markdown

Ready to review this PR? Stage has broken it down into 1 individual chapter for you:

Title
1 Stabilize test emoji output via LANG environment variable
Open in Stage

Chapters generated by Stage for commit 60ba58a on Jul 3, 2026 11:29pm UTC.

Before this patch, some test results were unstable:

```
    4       │-✔ Default toolchain set to version 'latest'
          4 │+Default toolchain set to version 'latest'
```

This is because `console` crate uses `LANG` for check that we should use
emoji or not.
https://github.com/console-rs/console/blob/0.16.3/src/unix_term.rs#L389-L396

To stabilize the results, this patch adds the environment variable
`LANG` for tests.
@codecov

codecov Bot commented Jul 3, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 89.78%. Comparing base (266f253) to head (60ba58a).

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #194   +/-   ##
=======================================
  Coverage   89.78%   89.78%           
=======================================
  Files          24       24           
  Lines        1429     1429           
=======================================
  Hits         1283     1283           
  Misses        146      146           

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@kenoss

kenoss commented Jul 3, 2026

Copy link
Copy Markdown
Contributor Author

Rebased.

@chawyehsu

chawyehsu commented Jul 4, 2026

Copy link
Copy Markdown
Owner

I think it would be more appropriate to put this env var in the TestWorkspace::cmd since there's already some other env vars for stabilizing tests there. Could you please test if it would work?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants