velxio/frontend/src/__tests__
David Montero Crespo c939005bf7 test(esp32): integration tests for QEMU examples
Closes the loop on the four ESP32 fixes that landed earlier in this
series. Each previously-broken or noisy example now has a regression
test that compiles the sketch through the production ESP-IDF compiler
and runs it in QEMU via esp32_worker.py — the same code path the
WebSocket /ws/{client_id} endpoint drives in production. Testing the
worker directly skips the WS transport but exercises the same compile
→ flash → boot → serial cascade.

Coverage:
- TestEsp32SerialCleanliness — DHT22, Servo+Pot, Joystick, Dual ADC
  Asserts the user's Serial.print substring shows up AND no
  `I (xxx) gpio:|wifi:|phy:` info-level ESP-IDF logs leak through.
  This validates the sdkconfig CONFIG_LOG_DEFAULT_LEVEL_WARN change
  from commit b373c97.

- TestEsp32CompileSuccess — BLE Advertise, LEDC RGB
  BLE Advertise validates the sdkconfig switch to Bluedroid (was
  NimBLE-only, which broke arduino-esp32's BLEDevice.h).
  LEDC RGB validates velxio_compat.h's ledcAttach() shim from
  commit f6f6f43; the sketch uses the arduino-esp32 3.x one-shot API
  on a 2.0.17 toolchain.

- TestEsp32WiFiSketches — WiFi Connect, WiFi WebServer
  Regression coverage to make sure the sdkconfig changes didn't break
  WiFi association. Connect must reach an "IP Address:" line; Server
  must report "Server started".

- frontend/src/__tests__/component-metadata-bmp280.test.ts
  Sanity check that the BMP280 entry from commit 1f3f2e0 survives
  metadata regeneration.

All ESP-IDF/QEMU tests use unittest.skipUnless on
_toolchain_available() so they no-op cleanly on dev boxes without
libqemu-xtensa, and only do real work in the Docker CI image.

Sketches are inlined verbatim from the public Velxio examples.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-08 18:39:22 -03:00
..
fixtures feat(multi-board): add wire-aware cross-board interconnect router 2026-04-25 19:47:40 -03:00
helpers feat(multi-board): add wire-aware cross-board interconnect router 2026-04-25 19:47:40 -03:00
AVRSimulator.test.ts refactor: rename components and update prefixes to 'velxio-' for consistency 2026-04-21 16:45:45 -03:00
PinManager.test.ts refactor: rename components and update prefixes to 'velxio-' for consistency 2026-04-21 16:45:45 -03:00
RP2040Simulator.test.ts refactor: rename components and update prefixes to 'velxio-' for consistency 2026-04-21 16:45:45 -03:00
ammeter-waveform.test.ts Add end-to-end tests for ammeter, voltmeter, and capacitor charging behavior 2026-04-21 02:17:30 -03:00
arduino-arduino-spi.test.ts fix(tests): restore Frontend Tests CI — patch stale RP2040 mocks + install-libraries 2026-05-02 22:46:32 -03:00
arduino-esp32-uart.test.ts fix(tests): restore Frontend Tests CI — patch stale RP2040 mocks + install-libraries 2026-05-02 22:46:32 -03:00
arduino-pico-digital.test.ts fix(tests): restore Frontend Tests CI — patch stale RP2040 mocks + install-libraries 2026-05-02 22:46:32 -03:00
arduino-pico-i2c.test.ts fix(tests): restore Frontend Tests CI — patch stale RP2040 mocks + install-libraries 2026-05-02 22:46:32 -03:00
arduino-pico-mixed-uart.test.ts fix(tests): restore Frontend Tests CI — patch stale RP2040 mocks + install-libraries 2026-05-02 22:46:32 -03:00
attiny85-simulation.test.ts test: increase timeout for blink sketch compilation test 2026-04-21 17:23:36 -03:00
capacitor-charge-transient.test.ts refactor: rename components and update prefixes to 'velxio-' for consistency 2026-04-21 16:45:45 -03:00
component-metadata-bmp280.test.ts test(esp32): integration tests for QEMU examples 2026-05-08 18:39:22 -03:00
component-to-spice.test.ts refactor: rename components and update prefixes to 'velxio-' for consistency 2026-04-21 16:45:45 -03:00
dual-arduino-digital.test.ts fix(tests): restore Frontend Tests CI — patch stale RP2040 mocks + install-libraries 2026-05-02 22:46:32 -03:00
dual-arduino-hw-uart.test.ts fix(tests): restore Frontend Tests CI — patch stale RP2040 mocks + install-libraries 2026-05-02 22:46:32 -03:00
dual-arduino-multi-protocol.test.ts fix(tests): restore Frontend Tests CI — patch stale RP2040 mocks + install-libraries 2026-05-02 22:46:32 -03:00
dual-arduino-software-serial.test.ts fix(tests): restore Frontend Tests CI — patch stale RP2040 mocks + install-libraries 2026-05-02 22:46:32 -03:00
dual-esp32-uart.test.ts fix(tests): restore Frontend Tests CI — patch stale RP2040 mocks + install-libraries 2026-05-02 22:46:32 -03:00
dual-pico-digital.test.ts fix(tests): restore Frontend Tests CI — patch stale RP2040 mocks + install-libraries 2026-05-02 22:46:32 -03:00
dual-pico-multi-protocol.test.ts fix(tests): restore Frontend Tests CI — patch stale RP2040 mocks + install-libraries 2026-05-02 22:46:32 -03:00
dual-pico-serial-passthrough.test.ts fix(tests): restore Frontend Tests CI — patch stale RP2040 mocks + install-libraries 2026-05-02 22:46:32 -03:00
epaper-part-integration.test.ts feat: add support for UC8159c (ACeP 7-colour) display 2026-04-30 00:27:40 -03:00
esp32-dht22-flow.test.ts fix(tests): restore Frontend Tests CI — patch stale RP2040 mocks + install-libraries 2026-05-02 22:46:32 -03:00
esp32-integration.test.ts fix(tests): restore Frontend Tests CI — patch stale RP2040 mocks + install-libraries 2026-05-02 22:46:32 -03:00
esp32-rectifier-integration.test.ts Add end-to-end tests for ammeter, voltmeter, and capacitor charging behavior 2026-04-21 02:17:30 -03:00
esp32-servo-pot.test.ts fix(tests): restore Frontend Tests CI — patch stale RP2040 mocks + install-libraries 2026-05-02 22:46:32 -03:00
esp32-wifi-bluetooth.test.ts fix(tests): restore Frontend Tests CI — patch stale RP2040 mocks + install-libraries 2026-05-02 22:46:32 -03:00
esp32-wifi-compile.test.ts refactor: rename components and update prefixes to 'velxio-' for consistency 2026-04-21 16:45:45 -03:00
esp32-wifi-webserver-integration.test.ts fix(tests): restore Frontend Tests CI — patch stale RP2040 mocks + install-libraries 2026-05-02 22:46:32 -03:00
esp32c3-blink.test.ts refactor: rename components and update prefixes to 'velxio-' for consistency 2026-04-21 16:45:45 -03:00
esp32c3-simulation.test.ts refactor: rename components and update prefixes to 'velxio-' for consistency 2026-04-21 16:45:45 -03:00
esp32c3-wifi-bluetooth.test.ts fix(tests): restore Frontend Tests CI — patch stale RP2040 mocks + install-libraries 2026-05-02 22:46:32 -03:00
examples-analog-live.test.ts refactor: rename components and update prefixes to 'velxio-' for consistency 2026-04-21 16:45:45 -03:00
examples-analog.test.ts refactor: rename components and update prefixes to 'velxio-' for consistency 2026-04-21 16:45:45 -03:00
examples-circuits.test.ts refactor: rename components and update prefixes to 'velxio-' for consistency 2026-04-21 16:45:45 -03:00
firmware-loader.test.ts refactor: rename components and update prefixes to 'velxio-' for consistency 2026-04-21 16:45:45 -03:00
flip-flop-parts.test.ts refactor: rename components and update prefixes to 'velxio-' for consistency 2026-04-21 16:45:45 -03:00
ili9341-emulation.test.ts refactor: rename components and update prefixes to 'velxio-' for consistency 2026-04-21 16:45:45 -03:00
install-libraries.test.ts fix(tests): restore Frontend Tests CI — patch stale RP2040 mocks + install-libraries 2026-05-02 22:46:32 -03:00
instruments.test.ts refactor: rename components and update prefixes to 'velxio-' for consistency 2026-04-21 16:45:45 -03:00
integration.test.ts refactor: rename components and update prefixes to 'velxio-' for consistency 2026-04-21 16:45:45 -03:00
interactive-parts.test.ts refactor: rename components and update prefixes to 'velxio-' for consistency 2026-04-21 16:45:45 -03:00
interconnect-routing.test.ts fix(tests): restore Frontend Tests CI — patch stale RP2040 mocks + install-libraries 2026-05-02 22:46:32 -03:00
issue-122-micropython-esp32.test.ts Add comprehensive tests for Cyw43Emulator functionality and lifecycle 2026-04-29 00:21:26 -03:00
logic-gate-parts.test.ts refactor: rename components and update prefixes to 'velxio-' for consistency 2026-04-21 16:45:45 -03:00
mega-emulation.test.ts refactor: rename components and update prefixes to 'velxio-' for consistency 2026-04-21 16:45:45 -03:00
motor-parts.test.ts refactor: rename components and update prefixes to 'velxio-' for consistency 2026-04-21 16:45:45 -03:00
multi-board-integration.test.ts fix(tests): restore Frontend Tests CI — patch stale RP2040 mocks + install-libraries 2026-05-02 22:46:32 -03:00
netlist-builder.test.ts refactor: rename components and update prefixes to 'velxio-' for consistency 2026-04-21 16:45:45 -03:00
pi3-pico-uart.test.ts fix(tests): restore Frontend Tests CI — patch stale RP2040 mocks + install-libraries 2026-05-02 22:46:32 -03:00
picow-cyw43-integration.test.ts feat(epaper): Add SVG layouts and emulation plan for ePaper panels 2026-04-29 02:33:59 -03:00
pong-emulation.test.ts refactor: rename components and update prefixes to 'velxio-' for consistency 2026-04-21 16:45:45 -03:00
protocol-parts.test.ts refactor: rename components and update prefixes to 'velxio-' for consistency 2026-04-21 16:45:45 -03:00
rp2040-pio-servo.test.ts refactor: rename components and update prefixes to 'velxio-' for consistency 2026-04-21 16:45:45 -03:00
sensor-parts.test.ts refactor: rename components and update prefixes to 'velxio-' for consistency 2026-04-21 16:45:45 -03:00
serial-batching.test.ts Add tests for serial batching and spice rectifier functionality 2026-04-20 23:56:42 -03:00
simulation-parts.test.ts refactor: rename components and update prefixes to 'velxio-' for consistency 2026-04-21 16:45:45 -03:00
simulation.test.ts
spice-ac.test.ts feat: electrical simulation via ngspice-WASM (eecircuit-engine) 2026-04-15 12:11:54 +00:00
spice-active.test.ts refactor: rename components and update prefixes to 'velxio-' for consistency 2026-04-21 16:45:45 -03:00
spice-avr-mixed.test.ts refactor: rename components and update prefixes to 'velxio-' for consistency 2026-04-21 16:45:45 -03:00
spice-digital.test.ts feat: electrical simulation via ngspice-WASM (eecircuit-engine) 2026-04-15 12:11:54 +00:00
spice-mosfet-diag.test.ts style: update ESLint rules and clean up code formatting across multiple files 2026-04-21 17:14:27 -03:00
spice-mosfet-pwm.test.ts refactor: rename components and update prefixes to 'velxio-' for consistency 2026-04-21 16:45:45 -03:00
spice-npn-switch-diag.test.ts style: update ESLint rules and clean up code formatting across multiple files 2026-04-21 17:14:27 -03:00
spice-npn-switch-integration.test.ts style: update ESLint rules and clean up code formatting across multiple files 2026-04-21 17:14:27 -03:00
spice-passive.test.ts refactor: rename components and update prefixes to 'velxio-' for consistency 2026-04-21 16:45:45 -03:00
spice-rectifier-integration.test.ts refactor: rename components and update prefixes to 'velxio-' for consistency 2026-04-21 16:45:45 -03:00
spice-rectifier-live-bootstrap.test.ts refactor: rename components and update prefixes to 'velxio-' for consistency 2026-04-21 16:45:45 -03:00
spice-rectifier-live-repro.test.ts refactor: rename components and update prefixes to 'velxio-' for consistency 2026-04-21 16:45:45 -03:00
spice-relaxation-oscillator.test.ts feat: electrical simulation via ngspice-WASM (eecircuit-engine) 2026-04-15 12:11:54 +00:00
spice-relay-integration.test.ts refactor: rename components and update prefixes to 'velxio-' for consistency 2026-04-21 16:45:45 -03:00
spice-signal-generator-tran.test.ts refactor: rename components and update prefixes to 'velxio-' for consistency 2026-04-21 16:45:45 -03:00
spice-smoke.test.ts refactor: rename components and update prefixes to 'velxio-' for consistency 2026-04-21 16:45:45 -03:00
spice-transient.test.ts refactor: rename components and update prefixes to 'velxio-' for consistency 2026-04-21 16:45:45 -03:00
ssd168x-decoder.test.ts feat: add support for UC8159c (ACeP 7-colour) display 2026-04-30 00:27:40 -03:00
ssd1306-render.test.ts refactor: rename components and update prefixes to 'velxio-' for consistency 2026-04-21 16:45:45 -03:00
triple-pico-digital-chain.test.ts fix(tests): restore Frontend Tests CI — patch stale RP2040 mocks + install-libraries 2026-05-02 22:46:32 -03:00
uc8159c-decoder.test.ts feat: add support for UC8159c (ACeP 7-colour) display 2026-04-30 00:27:40 -03:00
undo-redo.test.ts feat(canvas): undo/redo command pattern + history slice 2026-05-08 12:03:17 -03:00
virtual-i2c-devices.test.ts refactor: rename wokwi-libs/ → third-party/ 2026-05-03 00:58:57 -03:00
voltmeter-waveform.test.ts Add end-to-end tests for ammeter, voltmeter, and capacitor charging behavior 2026-04-21 02:17:30 -03:00
waveform-stats.test.ts Add end-to-end tests for ammeter, voltmeter, and capacitor charging behavior 2026-04-21 02:17:30 -03:00