Skip to content

[reflex-xy] asset test rejects the minified production JS bundle #393

Description

@Alek99

Summary

tests/reflex_adapter/test_assets.py::test_client_source_is_the_installed_bundle fails after the official production JS build because it searches for unminified source declarations in a deliberately minified bundle.

Verified on main at d505ef5789d8b18e23fd838300b039932dc399ce.

Reproduction

node js/build.mjs
.venv/bin/pytest -q tests/reflex_adapter/test_assets.py::test_client_source_is_the_installed_bundle

Actual behavior

The build succeeds and writes minified python/xy/static/index.js. The test then fails on:

AssertionError: assert 'function renderStandalone(' in <minified bundle>

The bundle still exports ChartView, decodeFrame, and renderStandalone; their declarations are renamed by minification. The adapter wheel and sdist artifact verifier both pass.

Expected behavior

The adapter asset test validates the shipped minified export contract instead of source-level identifier spelling.

Acceptance criteria

  • The test passes against the exact bundle produced by node js/build.mjs.
  • It still fails if any required public export is actually missing.
  • The full tests/reflex_adapter suite passes after the production bundle is built.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions