Skip to content

Commit

Permalink
Add test for zoomable in candlestick
Browse files Browse the repository at this point in the history
  • Loading branch information
pnezis committed Nov 2, 2024
1 parent 502762e commit 20602f7
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions test/tucan/finance_test.exs
Original file line number Diff line number Diff line change
Expand Up @@ -29,5 +29,21 @@ defmodule Tucan.FinanceTest do
assert Tucan.Finance.candlestick(@ohlc_dataset, "date", "open", "high", "low", "close") ==
expected
end

test "with zoomable set" do
vl =
Tucan.Finance.candlestick(@ohlc_dataset, "date", "open", "high", "low", "close",
zoomable: true
)

refute Map.has_key?(vl.spec, "params")
assert [layer0, layer1] = vl.spec["layer"]

assert layer0["params"] == [
%{"bind" => "scales", "name" => "_grid", "select" => "interval"}
]

refute Map.has_key?(layer1, "params")
end
end
end

0 comments on commit 20602f7

Please sign in to comment.