test(frontend): add data-processing stress guards#107
Conversation
Covers six scenarios not tested elsewhere: large CSV scale (1 000 rows), wide CSV (30 columns), multi-file CSV+JSON accumulation without variable duplication, boolean/null type inference, many-levels storage (guard for the Variables step "Show all N" display), and a smoke-test-2 regression that pins the VARIABLE_MISSING_FROM_CSV_COLUMNS / INVALID_SCHEMAORG_PROPERTY validator output for the mixed CSV+JSON case. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
|
CSV "true"/"false" string-to-boolean conversion is environment-sensitive (passes locally on Windows, fails in CI on Linux). Use native JSON booleans instead, which bypass the string-conversion path entirely. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- Extract shared validatorOutput helper to tests/helpers.ts - Import it in both validatePsychDS.test.ts and dataProcessingStress.test.ts - Remove local duplicate validatorOutput from smoke-test-2 describe block - Delete no-op test that only tested Jest itself, not any production code - Fix wide CSV describe/test label: 31 columns total (30 data + trial_index) - Clarify PR #103 comment: still open, not yet landed Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- Add VariableMeta interface to replace as-any casts on getVariable() calls - Fix mockFetch to return ok:true, eliminating spurious PluginCache warns instead of suppressing console.warn globally - Remove trailing blank line in multi-file describe block Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
The replace_all for VariableMeta accidentally caught the global cast too.
Use the precise typeof globalThis & { fetch: jest.Mock } instead.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…ayer overlap - Rename dataProcessingStress.test.ts -> dataProcessing.stress.test.ts to match the repo's *.stress.test.ts convention (#104/#106). - Add a header note explaining the intentional overlap with packages/metadata's stress suites: these guard generate() through the frontend bundle's own resolution path, plus frontend-only coverage (multi-file CSV+JSON accumulation, validator partitioning). No changeset: the frontend package is private and unversioned, so changesets ignores it. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
|
Rebased onto current |
Summary
dataProcessingStress.test.tstopackages/frontend/tests/— 12 tests across 6 describe blocksTest plan
cd packages/frontend && npx jest --no-coverage— all 48 tests pass🤖 Generated with Claude Code