diff --git a/src/basics.jl b/src/basics.jl index 68449ea..9955a57 100644 --- a/src/basics.jl +++ b/src/basics.jl @@ -54,7 +54,8 @@ end ## Plotly Version ## -function change_plotly_version(ver::String) +function change_plotly_version(v) + ver = VersionNumber(v) maybe_add_plotly_local(ver) PLOTLY_VERSION[] = ver end diff --git a/test/basic_coverage.jl b/test/basic_coverage.jl index 7eaf916..aa3c554 100644 --- a/test/basic_coverage.jl +++ b/test/basic_coverage.jl @@ -1,6 +1,6 @@ using Test using PlutoPlotly -using PlutoPlotly: _preprocess, SKIP_FLOAT32, skip_float32 +using PlutoPlotly: _preprocess, SKIP_FLOAT32, skip_float32, ARTIFACT_VERSION using PlutoPlotly.PlotlyBase: ColorScheme, Colors, Cycler, templates @test SKIP_FLOAT32[] == false @@ -35,4 +35,8 @@ let p = plot(rand(4)) @test_throws "invalid keyword arguments" change_image_options!(p; heights = 400) end -@test plutoplotly_paste_receiver() isa PlutoPlotly.HypertextLiteral.Result \ No newline at end of file +@test plutoplotly_paste_receiver() isa PlutoPlotly.HypertextLiteral.Result + +@test get_plotly_version() === ARTIFACT_VERSION +@test change_plotly_version("2.30") === VersionNumber("2.30.0") +@test get_plotly_version() === VersionNumber("2.30.0") \ No newline at end of file