Title: improvement(tests): converge env-flags mocks onto a complete shared mock by waleedlatif1 · Pull Request #5871 · simstudioai/sim · GitHub
Open Graph Title: improvement(tests): converge env-flags mocks onto a complete shared mock by waleedlatif1 · Pull Request #5871 · simstudioai/sim
X Title: improvement(tests): converge env-flags mocks onto a complete shared mock by waleedlatif1 · Pull Request #5871 · simstudioai/sim
Description: Summary Rewrite @sim/testing's env-flags mock as a COMPLETE, stateful module mock (all 37 flags + 5 functions; live accessors, setEnvFlags() / resetEnvFlagsMock() / envFlagsMockFns) and install it globally in vitest.setup — the old shared mock was itself missing 10 exports and had one wrong default Migrate all 66 file-local vi.mock('@/lib/core/config/env-flags') factories onto it (partial factories were poisoning shared-worker runs: a suite crashed with 'No isHosted export is defined' from another file's partial mock); zero env-flags factories remain Drop the repo's only bare vi.mock('mod') automock (drizzle-orm in knowledge search utils) — a bare automock colliding with factory mocks of the same module in a shared worker corrupts vitest's mock registry (reproduced in isolation; upstream vitest-dev/vitest#10290 / #10145) Phase 2 of the shared-worker campaign (db-mock convergence was #5856 + #5861/#5863/#5864/#5866) Type of Change Improvement Testing Full apps/sim suite green locally (13732/13733; sole failure is the known local ripgrep dependency, green in CI). All 66 migrated files re-verified together (1729/1729). tsc clean in apps/sim and packages/testing; biome clean. Checklist Code follows project style guidelines Self-reviewed my changes Tests added/updated and passing No new warnings introduced I confirm that I have read and agree to the terms outlined in the Contributor License Agreement (CLA)
Open Graph Description: Summary Rewrite @sim/testing's env-flags mock as a COMPLETE, stateful module mock (all 37 flags + 5 functions; live accessors, setEnvFlags() / resetEnvFlagsMock() / envFlagsMockFns) and instal...
X Description: Summary Rewrite @sim/testing's env-flags mock as a COMPLETE, stateful module mock (all 37 flags + 5 functions; live accessors, setEnvFlags() / resetEnvFlagsMock() / envFlagsMockFns) and in...
Opengraph URL: https://github.com/simstudioai/sim/pull/5871
X: @github
Domain: github.com
| route-pattern | /:user_id/:repository/pull/:id/files(.:format) |
| route-controller | pull_requests |
| route-action | files |
| fetch-nonce | v2:51339f45-c3b7-da05-6fa3-f6e1fef5f214 |
| current-catalog-service-hash | ae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b |
| request-id | B17A:C4AF2:34FB684:4A0B381:6A63581B |
| html-safe-nonce | b6176f463103aadf669b988ae14043178a219e38d227fd539f82beaee20df43f |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJCMTdBOkM0QUYyOjM0RkI2ODQ6NEEwQjM4MTo2QTYzNTgxQiIsInZpc2l0b3JfaWQiOiI3NjE1NTgzNzUwNDQyOTMyMjUxIiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= |
| visitor-hmac | 4a5bc40c494d85b7c3a65a82ecf347a814e93f1522246d927932b0878e65bba3 |
| hovercard-subject-tag | pull_request:4112650834 |
| github-keyboard-shortcuts | repository,pull-request-list,pull-request-conversation,pull-request-files-changed,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/simstudioai/sim/pull/5871/files |
| twitter:image | https://avatars.githubusercontent.com/u/40672544?s=400&v=4 |
| twitter:card | summary_large_image |
| og:image | https://avatars.githubusercontent.com/u/40672544?s=400&v=4 |
| og:image:alt | Summary Rewrite @sim/testing's env-flags mock as a COMPLETE, stateful module mock (all 37 flags + 5 functions; live accessors, setEnvFlags() / resetEnvFlagsMock() / envFlagsMockFns) and instal... |
| og:site_name | GitHub |
| og:type | object |
| hostname | github.com |
| expected-hostname | github.com |
| None | 59e55daad7174ca59d63c6974d58276ccb5477442e550bebb3c035e1bef11c94 |
| turbo-cache-control | no-preview |
| diff-view | unified |
| go-import | github.com/simstudioai/sim git https://github.com/simstudioai/sim.git |
| octolytics-dimension-user_id | 199344406 |
| octolytics-dimension-user_login | simstudioai |
| octolytics-dimension-repository_id | 912559512 |
| octolytics-dimension-repository_nwo | simstudioai/sim |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 912559512 |
| octolytics-dimension-repository_network_root_nwo | simstudioai/sim |
| turbo-body-classes | logged-out env-production page-responsive full-width |
| disable-turbo | true |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 990295d92a4cc7b63fbbd83a046217cd7d77d49c |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width