From 8aecd2cd6f0fd415e61cce1ba395f3d11b234b07 Mon Sep 17 00:00:00 2001 From: Fredrik Ekre Date: Wed, 26 Feb 2020 17:27:48 +0100 Subject: [PATCH] Add support for Observables v0.3 to the v0.5 release series. (#34) --- Project.toml | 6 +++--- test/runtests.jl | 8 ++++---- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/Project.toml b/Project.toml index 887d35c..fc5729b 100644 --- a/Project.toml +++ b/Project.toml @@ -1,7 +1,7 @@ name = "JSExpr" uuid = "97c1335a-c9c5-57fe-bc5d-ec35cebe8660" license = "MIT" -version = "0.5.1" +version = "0.5.2" [deps] JSON = "682c06a0-de6a-54ab-a142-c8b1cf79cde6" @@ -10,9 +10,9 @@ Observables = "510215fc-4207-5dde-b226-833fc4488ee2" WebIO = "0f1e0344-ec1d-5b48-a673-e5cf874b6c29" [compat] -julia = "0.7, 1" -Observables = "0.2.2" +Observables = "0.2.2,0.3" WebIO = "0.8.5" +julia = "0.7, 1" [extras] Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40" diff --git a/test/runtests.jl b/test/runtests.jl index dbdc67c..5d6568f 100644 --- a/test/runtests.jl +++ b/test/runtests.jl @@ -1,6 +1,6 @@ using JSExpr using WebIO -import WebIO: scopeid +import WebIO: scopeid, obsid using Test @testset "@js_str" begin @@ -76,9 +76,9 @@ end @test_throws ErrorException @js $ob ob = Observable{Any}(w, "test", nothing) - @test @js($ob) == js"{\"name\":\"test\",\"scope\":$(scopeid(w)),\"id\":\"ob_02\",\"type\":\"observable\"}" + @test @js($ob) == js"{\"name\":\"test\",\"scope\":$(scopeid(w)),\"id\":$(obsid(ob)),\"type\":\"observable\"}" - @test @js($ob[]) == js"WebIO.getval({\"name\":\"test\",\"scope\":$(scopeid(w)),\"id\":\"ob_02\",\"type\":\"observable\"})" - @test @js($ob[] = 1) == js"WebIO.setval({\"name\":\"test\",\"scope\":$(scopeid(w)),\"id\":\"ob_02\",\"type\":\"observable\"},1)" + @test @js($ob[]) == js"WebIO.getval({\"name\":\"test\",\"scope\":$(scopeid(w)),\"id\":$(obsid(ob)),\"type\":\"observable\"})" + @test @js($ob[] = 1) == js"WebIO.setval({\"name\":\"test\",\"scope\":$(scopeid(w)),\"id\":$(obsid(ob)),\"type\":\"observable\"},1)" end end