diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index c445a41..a333ec9 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -53,11 +53,11 @@ jobs: run: cargo check --all-targets --quiet - name: Cargo clippy run: cargo clippy --all-targets --all-features --quiet -- -D warnings || echo 'Clippy warnings found' - - name: Run Node.js tests + - name: Run render tests env: INSTA_WORKSPACE_ROOT: ${{ github.workspace }} CHROMIUM_FLAGS: --enable-unsafe-webgpu - run: wasm-pack test --chrome --headless + run: wasm-pack test --chrome --headless -- --features render node-test: if: ${{ github.actor == 'qqrm' }} @@ -88,4 +88,4 @@ jobs: - name: Run logic-only tests env: INSTA_WORKSPACE_ROOT: ${{ github.workspace }} - run: npm run test:node -- --features logic-only --test logic_only + run: npm run test:node -- --features logic-only diff --git a/Cargo.toml b/Cargo.toml index 5e90ef8..eccbb6b 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -43,9 +43,10 @@ quickcheck_macros = "1" [features] parallel = ["rayon"] logic-only = [] +render = [] [profile.dev] panic = "unwind" # Preserves stack traces [profile.release] debug = 1 # Keep debug symbols even in release mode -panic = "unwind" # Preserve stack traces \ No newline at end of file +panic = "unwind" # Preserve stack traces diff --git a/tests/README.md b/tests/README.md index 0155d9f..d7e8342 100644 --- a/tests/README.md +++ b/tests/README.md @@ -58,14 +58,14 @@ Before running the suite ensure the WebAssembly target is installed: The build script will fail if the target is missing. ```bash -# All WASM tests -wasm-pack test --chrome --headless +# Logic-only tests +wasm-pack test --node -- --features logic-only -# Specific test -wasm-pack test --chrome --headless --test offset +# Render tests +wasm-pack test --chrome --headless -- --features render -# Headless Chrome without UI -wasm-pack test --chrome --headless +# Specific render test +wasm-pack test --chrome --headless -- --features render --test offset ``` ## Key Checks diff --git a/tests/abort_handle.rs b/tests/abort_handle.rs index e92d557..dad282e 100644 --- a/tests/abort_handle.rs +++ b/tests/abort_handle.rs @@ -1,3 +1,4 @@ +#![cfg(feature = "render")] use futures::future::{AbortHandle, Abortable}; use gloo_timers::future::sleep; use leptos::*; diff --git a/tests/aggregator.rs b/tests/aggregator.rs index 236bbca..8dedb1a 100644 --- a/tests/aggregator.rs +++ b/tests/aggregator.rs @@ -1,3 +1,4 @@ +#![cfg(feature = "render")] use price_chart_wasm::domain::market_data::services::Aggregator; use price_chart_wasm::domain::market_data::{ Candle, OHLCV, Price, TimeInterval, Timestamp, Volume, diff --git a/tests/auto_scroll.rs b/tests/auto_scroll.rs index 050074c..7886a0c 100644 --- a/tests/auto_scroll.rs +++ b/tests/auto_scroll.rs @@ -1,3 +1,4 @@ +#![cfg(feature = "render")] use price_chart_wasm::app::should_auto_scroll; #[test] diff --git a/tests/axis_pan.rs b/tests/axis_pan.rs index 7edf297..0253cca 100644 --- a/tests/axis_pan.rs +++ b/tests/axis_pan.rs @@ -1,3 +1,4 @@ +#![cfg(feature = "render")] use price_chart_wasm::app::price_levels; use price_chart_wasm::domain::chart::value_objects::Viewport; use wasm_bindgen_test::*; diff --git a/tests/axis_zoom.rs b/tests/axis_zoom.rs index 994f0eb..35c1e03 100644 --- a/tests/axis_zoom.rs +++ b/tests/axis_zoom.rs @@ -1,3 +1,4 @@ +#![cfg(feature = "render")] use price_chart_wasm::app::{price_levels, visible_range, visible_range_by_time}; use price_chart_wasm::domain::chart::value_objects::Viewport; use price_chart_wasm::domain::market_data::{Candle, OHLCV, Price, Timestamp, Volume}; diff --git a/tests/candle_alignment.rs b/tests/candle_alignment.rs index eb5c457..c93cba4 100644 --- a/tests/candle_alignment.rs +++ b/tests/candle_alignment.rs @@ -1,3 +1,4 @@ +#![cfg(feature = "render")] use price_chart_wasm::infrastructure::rendering::renderer::{ EDGE_GAP, MAX_ELEMENT_WIDTH, MIN_ELEMENT_WIDTH, candle_x_position, spacing_ratio_for, }; diff --git a/tests/candle_width_max_zoom.rs b/tests/candle_width_max_zoom.rs index 278c44c..40ea04b 100644 --- a/tests/candle_width_max_zoom.rs +++ b/tests/candle_width_max_zoom.rs @@ -1,3 +1,4 @@ +#![cfg(feature = "render")] use price_chart_wasm::infrastructure::rendering::renderer::{MIN_ELEMENT_WIDTH, SPACING_RATIO}; use wasm_bindgen_test::*; diff --git a/tests/chart_pan.rs b/tests/chart_pan.rs index 11621a3..84d23e5 100644 --- a/tests/chart_pan.rs +++ b/tests/chart_pan.rs @@ -1,3 +1,4 @@ +#![cfg(feature = "render")] use price_chart_wasm::domain::chart::Chart; use price_chart_wasm::domain::chart::value_objects::ChartType; use price_chart_wasm::domain::chart::value_objects::Viewport; diff --git a/tests/chart_positioning.rs b/tests/chart_positioning.rs index 84cd12b..e078386 100644 --- a/tests/chart_positioning.rs +++ b/tests/chart_positioning.rs @@ -1,3 +1,4 @@ +#![cfg(feature = "render")] use price_chart_wasm::infrastructure::rendering::renderer::{ EDGE_GAP, MAX_ELEMENT_WIDTH, MIN_ELEMENT_WIDTH, candle_x_position, spacing_ratio_for, }; diff --git a/tests/current_time.rs b/tests/current_time.rs index 227c1b0..cd842d1 100644 --- a/tests/current_time.rs +++ b/tests/current_time.rs @@ -1,3 +1,4 @@ +#![cfg(feature = "render")] use price_chart_wasm::app::visible_range; use price_chart_wasm::domain::chart::{Chart, value_objects::ChartType}; use price_chart_wasm::domain::market_data::{Candle, OHLCV, Price, Timestamp, Volume}; diff --git a/tests/dynamic_spacing.rs b/tests/dynamic_spacing.rs index 53d86cd..e94515b 100644 --- a/tests/dynamic_spacing.rs +++ b/tests/dynamic_spacing.rs @@ -1,3 +1,4 @@ +#![cfg(feature = "render")] use price_chart_wasm::infrastructure::rendering::renderer::spacing_ratio_for; use wasm_bindgen_test::*; diff --git a/tests/ecs_chart_update.rs b/tests/ecs_chart_update.rs index ecd61d8..5ebedb2 100644 --- a/tests/ecs_chart_update.rs +++ b/tests/ecs_chart_update.rs @@ -1,3 +1,4 @@ +#![cfg(feature = "render")] use leptos::*; use price_chart_wasm::domain::chart::{Chart, value_objects::ChartType}; use price_chart_wasm::domain::market_data::{Candle, OHLCV, Price, Symbol, Timestamp, Volume}; diff --git a/tests/ecs_full_pipeline.rs b/tests/ecs_full_pipeline.rs index 5edd9c7..4e31b34 100644 --- a/tests/ecs_full_pipeline.rs +++ b/tests/ecs_full_pipeline.rs @@ -1,3 +1,4 @@ +#![cfg(feature = "render")] use leptos::*; use price_chart_wasm::domain::market_data::{Symbol, TimeInterval}; use price_chart_wasm::global_state::{ecs_world, ensure_chart, push_realtime_candle}; diff --git a/tests/ecs_global_integration.rs b/tests/ecs_global_integration.rs index 4a80f90..19ca493 100644 --- a/tests/ecs_global_integration.rs +++ b/tests/ecs_global_integration.rs @@ -1,3 +1,4 @@ +#![cfg(feature = "render")] use leptos::*; use price_chart_wasm::domain::market_data::{Candle, OHLCV, Price, Symbol, Timestamp, Volume}; use price_chart_wasm::ecs::components::ChartComponent; diff --git a/tests/ecs_signal_sync.rs b/tests/ecs_signal_sync.rs index dd07749..100ba45 100644 --- a/tests/ecs_signal_sync.rs +++ b/tests/ecs_signal_sync.rs @@ -1,3 +1,4 @@ +#![cfg(feature = "render")] use leptos::*; use price_chart_wasm::domain::market_data::{Candle, OHLCV, Price, Symbol, Timestamp, Volume}; use price_chart_wasm::global_state::{ diff --git a/tests/ecs_world.rs b/tests/ecs_world.rs index b6c3477..627fc47 100644 --- a/tests/ecs_world.rs +++ b/tests/ecs_world.rs @@ -1,3 +1,4 @@ +#![cfg(feature = "render")] use leptos::*; use price_chart_wasm::domain::chart::{Chart, value_objects::ChartType}; use price_chart_wasm::domain::market_data::{Candle, OHLCV, Price, Timestamp, Volume}; diff --git a/tests/geometry.rs b/tests/geometry.rs index 9a4fa9c..83c788d 100644 --- a/tests/geometry.rs +++ b/tests/geometry.rs @@ -1,3 +1,4 @@ +#![cfg(feature = "render")] use price_chart_wasm::domain::market_data::{Candle, OHLCV, Price, Timestamp, Volume}; use price_chart_wasm::infrastructure::rendering::gpu_structures::CandleGeometry; use wasm_bindgen_test::*; diff --git a/tests/gpu_memory.rs b/tests/gpu_memory.rs index 5a65c35..16ddb37 100644 --- a/tests/gpu_memory.rs +++ b/tests/gpu_memory.rs @@ -1,3 +1,4 @@ +#![cfg(feature = "render")] use price_chart_wasm::infrastructure::rendering::renderer::WebGpuRenderer; use wasm_bindgen::JsCast; use wasm_bindgen_test::*; diff --git a/tests/grid_vertices.rs b/tests/grid_vertices.rs index 3c4d56e..6532184 100644 --- a/tests/grid_vertices.rs +++ b/tests/grid_vertices.rs @@ -1,3 +1,4 @@ +#![cfg(feature = "render")] use price_chart_wasm::infrastructure::rendering::gpu_structures::CandleGeometry; use wasm_bindgen_test::*; diff --git a/tests/historical_ma_render.rs b/tests/historical_ma_render.rs index a6c7fdc..9e819d8 100644 --- a/tests/historical_ma_render.rs +++ b/tests/historical_ma_render.rs @@ -1,3 +1,4 @@ +#![cfg(feature = "render")] use price_chart_wasm::domain::chart::{Chart, value_objects::ChartType}; use price_chart_wasm::domain::market_data::{Candle, OHLCV, Price, Timestamp, Volume}; use price_chart_wasm::infrastructure::rendering::renderer::dummy_renderer; diff --git a/tests/history_backfill.rs b/tests/history_backfill.rs index e63f1a0..0fecfdd 100644 --- a/tests/history_backfill.rs +++ b/tests/history_backfill.rs @@ -1,3 +1,4 @@ +#![cfg(feature = "render")] use price_chart_wasm::domain::{ chart::{Chart, value_objects::ChartType}, market_data::{Candle, OHLCV, Price, TimeInterval, Timestamp, Volume}, diff --git a/tests/history_fetch.rs b/tests/history_fetch.rs index c53878b..e4ae0d5 100644 --- a/tests/history_fetch.rs +++ b/tests/history_fetch.rs @@ -1,3 +1,4 @@ +#![cfg(feature = "render")] use price_chart_wasm::app::{HISTORY_PRELOAD_THRESHOLD, should_fetch_history}; wasm_bindgen_test::wasm_bindgen_test_configure!(run_in_browser); #[test] diff --git a/tests/indicator_engine.rs b/tests/indicator_engine.rs index cccb95f..f80d829 100644 --- a/tests/indicator_engine.rs +++ b/tests/indicator_engine.rs @@ -1,3 +1,4 @@ +#![cfg(feature = "render")] use price_chart_wasm::domain::market_data::{ Candle, OHLCV, Price, Timestamp, Volume, indicator_engine::MovingAverageEngine, services::MarketAnalysisService, diff --git a/tests/indicator_perf.rs b/tests/indicator_perf.rs index 554b482..ff9d689 100644 --- a/tests/indicator_perf.rs +++ b/tests/indicator_perf.rs @@ -1,3 +1,4 @@ +#![cfg(feature = "render")] #[cfg(not(target_arch = "wasm32"))] use price_chart_wasm::domain::market_data::{ Candle, OHLCV, Price, Timestamp, Volume, indicator_engine::MovingAverageEngine, diff --git a/tests/indicator_vertices.rs b/tests/indicator_vertices.rs index 345c52c..a74ad74 100644 --- a/tests/indicator_vertices.rs +++ b/tests/indicator_vertices.rs @@ -1,3 +1,4 @@ +#![cfg(feature = "render")] use price_chart_wasm::domain::market_data::services::MarketAnalysisService; use price_chart_wasm::domain::market_data::{Candle, OHLCV, Price, Timestamp, Volume}; use price_chart_wasm::infrastructure::rendering::gpu_structures::{CandleGeometry, IndicatorType}; diff --git a/tests/interval_restart.rs b/tests/interval_restart.rs index cc3b42b..b5c4b13 100644 --- a/tests/interval_restart.rs +++ b/tests/interval_restart.rs @@ -1,3 +1,4 @@ +#![cfg(feature = "render")] use gloo_timers::future::sleep; use leptos::*; use price_chart_wasm::app::{ diff --git a/tests/market_data.rs b/tests/market_data.rs index 7c0643b..1b961aa 100644 --- a/tests/market_data.rs +++ b/tests/market_data.rs @@ -1,3 +1,4 @@ +#![cfg(feature = "render")] use price_chart_wasm::domain::market_data::{ Candle, CandleSeries, OHLCV, Price, Timestamp, Volume, }; diff --git a/tests/moving_average.rs b/tests/moving_average.rs index f7f3a92..84eae83 100644 --- a/tests/moving_average.rs +++ b/tests/moving_average.rs @@ -1,3 +1,4 @@ +#![cfg(feature = "render")] use price_chart_wasm::domain::market_data::{ Candle, OHLCV, Price, Timestamp, Volume, services::MarketAnalysisService, }; diff --git a/tests/msaa.rs b/tests/msaa.rs index eca4c82..2c8f7ab 100644 --- a/tests/msaa.rs +++ b/tests/msaa.rs @@ -1,3 +1,4 @@ +#![cfg(feature = "render")] use price_chart_wasm::infrastructure::rendering::renderer::MSAA_SAMPLE_COUNT; use wasm_bindgen_test::*; diff --git a/tests/multi_symbol.rs b/tests/multi_symbol.rs index cfc5758..be4dbf5 100644 --- a/tests/multi_symbol.rs +++ b/tests/multi_symbol.rs @@ -1,3 +1,4 @@ +#![cfg(feature = "render")] use leptos::*; use price_chart_wasm::domain::market_data::{Candle, OHLCV, Price, Symbol, Timestamp, Volume}; use price_chart_wasm::global_state::ensure_chart; diff --git a/tests/offset.rs b/tests/offset.rs index 59f5e5d..7ad3cd9 100644 --- a/tests/offset.rs +++ b/tests/offset.rs @@ -1,3 +1,4 @@ +#![cfg(feature = "render")] use price_chart_wasm::infrastructure::rendering::renderer::{ EDGE_GAP, MAX_ELEMENT_WIDTH, MIN_ELEMENT_WIDTH, candle_x_position, spacing_ratio_for, }; diff --git a/tests/pan_offset.rs b/tests/pan_offset.rs index e51129d..e94751c 100644 --- a/tests/pan_offset.rs +++ b/tests/pan_offset.rs @@ -1,3 +1,4 @@ +#![cfg(feature = "render")] use price_chart_wasm::app::{HISTORY_PRELOAD_THRESHOLD, should_fetch_history}; #[test] diff --git a/tests/pan_viewport.rs b/tests/pan_viewport.rs index 5e50a1f..e135025 100644 --- a/tests/pan_viewport.rs +++ b/tests/pan_viewport.rs @@ -1,3 +1,4 @@ +#![cfg(feature = "render")] use price_chart_wasm::app::visible_range_by_time; use price_chart_wasm::domain::chart::value_objects::Viewport; use price_chart_wasm::domain::market_data::{Candle, OHLCV, Price, Timestamp, Volume}; diff --git a/tests/performance_limit.rs b/tests/performance_limit.rs index aa57752..be2f714 100644 --- a/tests/performance_limit.rs +++ b/tests/performance_limit.rs @@ -1,3 +1,4 @@ +#![cfg(feature = "render")] use price_chart_wasm::domain::{ chart::{Chart, ChartType}, market_data::{Candle, OHLCV, Price, Timestamp, Volume}, diff --git a/tests/positioning_regression.rs b/tests/positioning_regression.rs index 518b76f..3d58faa 100644 --- a/tests/positioning_regression.rs +++ b/tests/positioning_regression.rs @@ -1,3 +1,4 @@ +#![cfg(feature = "render")] use price_chart_wasm::infrastructure::rendering::renderer::{ EDGE_GAP, MAX_ELEMENT_WIDTH, MIN_ELEMENT_WIDTH, candle_x_position, spacing_ratio_for, }; diff --git a/tests/realtime_viewport.rs b/tests/realtime_viewport.rs index 5828323..ce884b6 100644 --- a/tests/realtime_viewport.rs +++ b/tests/realtime_viewport.rs @@ -1,3 +1,4 @@ +#![cfg(feature = "render")] use price_chart_wasm::domain::chart::Chart; use price_chart_wasm::domain::chart::value_objects::{ChartType, Viewport}; use price_chart_wasm::domain::market_data::{Candle, OHLCV, Price, Timestamp, Volume}; diff --git a/tests/reconnect.rs b/tests/reconnect.rs index e2f942e..9728801 100644 --- a/tests/reconnect.rs +++ b/tests/reconnect.rs @@ -1,3 +1,4 @@ +#![cfg(feature = "render")] use futures::future::select; use gloo_timers::future::sleep; use price_chart_wasm::domain::market_data::{Symbol, TimeInterval}; diff --git a/tests/rendering_sync.rs b/tests/rendering_sync.rs index b148e2b..e5e36b4 100644 --- a/tests/rendering_sync.rs +++ b/tests/rendering_sync.rs @@ -1,3 +1,4 @@ +#![cfg(feature = "render")] use price_chart_wasm::domain::{ chart::{Chart, value_objects::ChartType}, market_data::{Candle, OHLCV, Price, Timestamp, Volume}, diff --git a/tests/series_expansion.rs b/tests/series_expansion.rs index fe8ee92..c039c2f 100644 --- a/tests/series_expansion.rs +++ b/tests/series_expansion.rs @@ -1,3 +1,4 @@ +#![cfg(feature = "render")] use price_chart_wasm::app::visible_range; use price_chart_wasm::domain::chart::{Chart, value_objects::ChartType}; use price_chart_wasm::domain::market_data::{Candle, OHLCV, Price, Timestamp, Volume}; diff --git a/tests/single_candle_width.rs b/tests/single_candle_width.rs index 71ed41a..4248d2d 100644 --- a/tests/single_candle_width.rs +++ b/tests/single_candle_width.rs @@ -1,3 +1,4 @@ +#![cfg(feature = "render")] use price_chart_wasm::infrastructure::rendering::renderer::{ MAX_ELEMENT_WIDTH, MIN_ELEMENT_WIDTH, spacing_ratio_for, }; diff --git a/tests/start_realtime.rs b/tests/start_realtime.rs index a045299..3207a6c 100644 --- a/tests/start_realtime.rs +++ b/tests/start_realtime.rs @@ -1,3 +1,4 @@ +#![cfg(feature = "render")] use price_chart_wasm::app::{visible_range, visible_range_by_time}; use price_chart_wasm::domain::chart::{Chart, value_objects::ChartType}; use price_chart_wasm::domain::market_data::{ diff --git a/tests/stream_abort_no_panic.rs b/tests/stream_abort_no_panic.rs index 36cc8ad..92311da 100644 --- a/tests/stream_abort_no_panic.rs +++ b/tests/stream_abort_no_panic.rs @@ -1,3 +1,4 @@ +#![cfg(feature = "render")] use gloo_timers::future::sleep; use leptos::*; use price_chart_wasm::app::{ diff --git a/tests/switch_symbol_abort.rs b/tests/switch_symbol_abort.rs index 3b75162..c13fa4f 100644 --- a/tests/switch_symbol_abort.rs +++ b/tests/switch_symbol_abort.rs @@ -1,3 +1,4 @@ +#![cfg(feature = "render")] use futures::future::{AbortHandle, Abortable}; use gloo_timers::future::sleep; use leptos::*; diff --git a/tests/switch_symbol_loop.rs b/tests/switch_symbol_loop.rs index 54d5997..7c91f6a 100644 --- a/tests/switch_symbol_loop.rs +++ b/tests/switch_symbol_loop.rs @@ -1,3 +1,4 @@ +#![cfg(feature = "render")] use futures::future::AbortHandle; use leptos::*; use price_chart_wasm::app::{abort_other_streams, current_symbol, stream_abort_handles}; diff --git a/tests/symbol_list.rs b/tests/symbol_list.rs index 29db79f..679996a 100644 --- a/tests/symbol_list.rs +++ b/tests/symbol_list.rs @@ -1,3 +1,4 @@ +#![cfg(feature = "render")] use price_chart_wasm::domain::market_data::value_objects::{Symbol, default_symbols}; use wasm_bindgen_test::*; diff --git a/tests/time_label_format.rs b/tests/time_label_format.rs index 69621bc..9b7a0e6 100644 --- a/tests/time_label_format.rs +++ b/tests/time_label_format.rs @@ -1,3 +1,4 @@ +#![cfg(feature = "render")] use js_sys::Date; use price_chart_wasm::time_utils::format_time_label; use wasm_bindgen::JsValue; diff --git a/tests/time_scale_sync.rs b/tests/time_scale_sync.rs index 2629aaa..00e1783 100644 --- a/tests/time_scale_sync.rs +++ b/tests/time_scale_sync.rs @@ -1,3 +1,4 @@ +#![cfg(feature = "render")] use price_chart_wasm::app::{visible_range, visible_range_by_time}; use price_chart_wasm::domain::chart::{Chart, value_objects::ChartType}; use price_chart_wasm::domain::market_data::{ diff --git a/tests/tooltip_positioning.rs b/tests/tooltip_positioning.rs index 6c896c2..33f0403 100644 --- a/tests/tooltip_positioning.rs +++ b/tests/tooltip_positioning.rs @@ -1,3 +1,4 @@ +#![cfg(feature = "render")] use price_chart_wasm::infrastructure::rendering::renderer::{ EDGE_GAP, MAX_ELEMENT_WIDTH, MIN_ELEMENT_WIDTH, candle_x_position, spacing_ratio_for, }; diff --git a/tests/view_state_zoom.rs b/tests/view_state_zoom.rs index 68576bf..d1e0b07 100644 --- a/tests/view_state_zoom.rs +++ b/tests/view_state_zoom.rs @@ -1,3 +1,4 @@ +#![cfg(feature = "render")] use price_chart_wasm::view_state::ViewState; use quickcheck_macros::quickcheck; diff --git a/tests/viewport.rs b/tests/viewport.rs index e2cd08c..911bfa0 100644 --- a/tests/viewport.rs +++ b/tests/viewport.rs @@ -1,3 +1,4 @@ +#![cfg(feature = "render")] use price_chart_wasm::domain::chart::value_objects::Viewport; use wasm_bindgen_test::*; diff --git a/tests/viewport_clamp.rs b/tests/viewport_clamp.rs index 9702b51..7952e23 100644 --- a/tests/viewport_clamp.rs +++ b/tests/viewport_clamp.rs @@ -1,3 +1,4 @@ +#![cfg(feature = "render")] use price_chart_wasm::domain::chart::{Chart, value_objects::ChartType}; use price_chart_wasm::domain::market_data::{Candle, OHLCV, Price, Timestamp, Volume}; use wasm_bindgen_test::*; diff --git a/tests/visibility_refresh.rs b/tests/visibility_refresh.rs index ebe3807..69b2e60 100644 --- a/tests/visibility_refresh.rs +++ b/tests/visibility_refresh.rs @@ -1,3 +1,4 @@ +#![cfg(feature = "render")] use price_chart_wasm::domain::{ chart::{Chart, value_objects::ChartType}, market_data::{Candle, OHLCV, Price, Timestamp, Volume}, diff --git a/tests/visible_len_zero.rs b/tests/visible_len_zero.rs index cded277..97045ff 100644 --- a/tests/visible_len_zero.rs +++ b/tests/visible_len_zero.rs @@ -1,3 +1,4 @@ +#![cfg(feature = "render")] use price_chart_wasm::infrastructure::rendering::renderer::candle_x_position; use wasm_bindgen_test::*; diff --git a/tests/visible_range.rs b/tests/visible_range.rs index 6448eea..fc5a33d 100644 --- a/tests/visible_range.rs +++ b/tests/visible_range.rs @@ -1,3 +1,4 @@ +#![cfg(feature = "render")] use price_chart_wasm::app::visible_range; #[test] diff --git a/tests/volume_candle_sync.rs b/tests/volume_candle_sync.rs index 5d0df5e..4508a76 100644 --- a/tests/volume_candle_sync.rs +++ b/tests/volume_candle_sync.rs @@ -1,3 +1,4 @@ +#![cfg(feature = "render")] use price_chart_wasm::domain::market_data::{Candle, OHLCV, Price, Timestamp, Volume}; use price_chart_wasm::infrastructure::rendering::renderer::{ EDGE_GAP, MAX_ELEMENT_WIDTH, MIN_ELEMENT_WIDTH, SPACING_RATIO, candle_x_position, diff --git a/tests/volume_vertices.rs b/tests/volume_vertices.rs index 8450c4f..ed08bcf 100644 --- a/tests/volume_vertices.rs +++ b/tests/volume_vertices.rs @@ -1,3 +1,4 @@ +#![cfg(feature = "render")] use price_chart_wasm::infrastructure::rendering::gpu_structures::CandleGeometry; use wasm_bindgen_test::*; diff --git a/tests/vs_transform.rs b/tests/vs_transform.rs index 17d6c86..e7afd80 100644 --- a/tests/vs_transform.rs +++ b/tests/vs_transform.rs @@ -1,3 +1,4 @@ +#![cfg(feature = "render")] use price_chart_wasm::infrastructure::rendering::gpu_structures::{CandleInstance, CandleVertex}; use wasm_bindgen_test::*; diff --git a/tests/websocket_parse.rs b/tests/websocket_parse.rs index d54e6b9..8407318 100644 --- a/tests/websocket_parse.rs +++ b/tests/websocket_parse.rs @@ -1,3 +1,4 @@ +#![cfg(feature = "render")] use price_chart_wasm::domain::market_data::{Symbol, TimeInterval}; use price_chart_wasm::infrastructure::websocket::binance_client::BinanceWebSocketClient; use wasm_bindgen_test::*; diff --git a/tests/width_sync_test.rs b/tests/width_sync_test.rs index d4fbf97..57b2517 100644 --- a/tests/width_sync_test.rs +++ b/tests/width_sync_test.rs @@ -1,3 +1,4 @@ +#![cfg(feature = "render")] use price_chart_wasm::infrastructure::rendering::renderer::{ EDGE_GAP, MIN_ELEMENT_WIDTH, candle_x_position, spacing_ratio_for, }; diff --git a/tests/zoom_centering.rs b/tests/zoom_centering.rs index 90fda4c..ade7253 100644 --- a/tests/zoom_centering.rs +++ b/tests/zoom_centering.rs @@ -1,3 +1,4 @@ +#![cfg(feature = "render")] use price_chart_wasm::domain::chart::value_objects::Viewport; use wasm_bindgen_test::*; diff --git a/tests/zoom_preservation.rs b/tests/zoom_preservation.rs index 111c7dc..c8d3600 100644 --- a/tests/zoom_preservation.rs +++ b/tests/zoom_preservation.rs @@ -1,3 +1,4 @@ +#![cfg(feature = "render")] use price_chart_wasm::domain::chart::{Chart, value_objects::ChartType}; use price_chart_wasm::domain::market_data::{Candle, OHLCV, Price, Timestamp, Volume}; use wasm_bindgen_test::*; diff --git a/tests/zoom_price.rs b/tests/zoom_price.rs index 69c24d4..a5ed33b 100644 --- a/tests/zoom_price.rs +++ b/tests/zoom_price.rs @@ -1,3 +1,4 @@ +#![cfg(feature = "render")] use price_chart_wasm::domain::chart::value_objects::Viewport; use wasm_bindgen_test::*;