e2e: pre-existing `tsc --noEmit` errors in cache-scenarios / request-id-uuid tests
Open
Beginner friendly
Nobody has claimed this yet.
bug
priority-normal
- Dominant language
- Rust
- Stars
- 157
- Forks
- 32
- Avg merge
- 1h 25m
- Merged PRs (30d)
- 145
Description
pnpm exec tsc --noEmit in tests/e2e reports 4 pre-existing type errors, unrelated to current feature work. Recording here; not fixing now.
Errors
src/cases/cache-scenarios-e2e.test.ts(96,36): error TS18048: 'app' is possibly 'undefined'.
src/cases/request-id-uuid-e2e.test.ts(124,20): error TS18048: 'app' is possibly 'undefined'.
src/cases/request-id-uuid-e2e.test.ts(128,20): error TS18048: 'app' is possibly 'undefined'.
src/cases/request-id-uuid-e2e.test.ts(132,20): error TS18048: 'app' is possibly 'undefined'.
Notes
strictNullChecksnarrowing gaps:app(aSpawnedApp | undefinedassigned inbeforeAll) is used in the test body without a non-null guard. Most other e2e cases gate onif (!app) { ctx.skip(); return; }first.- vitest runs via esbuild (no typecheck at runtime), so these do not fail the test run — only
tsc --noEmitsurfaces them. CI does not currently runtsc --noEmiton the e2e harness. - Suggested fix: add the missing
if (!etcdReachable || !app) { ctx.skip(); return; }guard (or a local non-null assertion) in those two files.
Surfaced while adding the aliyun_sls exporter e2e (which typechecks clean); deferred by decision.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with src/cases/cache-scenarios-e2e.test.ts at line 96 and src/cases/request-id-uuid-e2e.test.ts at lines 124, 128, and 132, then compare their setup with other e2e cases that guard app before use. Run pnpm exec tsc --noEmit from tests/e2e; done means the four TS18048 errors no longer appear.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- testing
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Quiet
- Clarity
- Clearly specified
- Newbie friendliness
- 72/100