Skip to content

Commit 8aecd2c

Browse files
authored
Add support for Observables v0.3 to the v0.5 release series. (#34)
1 parent 4939116 commit 8aecd2c

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

Project.toml

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
name = "JSExpr"
22
uuid = "97c1335a-c9c5-57fe-bc5d-ec35cebe8660"
33
license = "MIT"
4-
version = "0.5.1"
4+
version = "0.5.2"
55

66
[deps]
77
JSON = "682c06a0-de6a-54ab-a142-c8b1cf79cde6"
@@ -10,9 +10,9 @@ Observables = "510215fc-4207-5dde-b226-833fc4488ee2"
1010
WebIO = "0f1e0344-ec1d-5b48-a673-e5cf874b6c29"
1111

1212
[compat]
13-
julia = "0.7, 1"
14-
Observables = "0.2.2"
13+
Observables = "0.2.2,0.3"
1514
WebIO = "0.8.5"
15+
julia = "0.7, 1"
1616

1717
[extras]
1818
Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40"

test/runtests.jl

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
using JSExpr
22
using WebIO
3-
import WebIO: scopeid
3+
import WebIO: scopeid, obsid
44
using Test
55

66
@testset "@js_str" begin
@@ -76,9 +76,9 @@ end
7676
@test_throws ErrorException @js $ob
7777

7878
ob = Observable{Any}(w, "test", nothing)
79-
@test @js($ob) == js"{\"name\":\"test\",\"scope\":$(scopeid(w)),\"id\":\"ob_02\",\"type\":\"observable\"}"
79+
@test @js($ob) == js"{\"name\":\"test\",\"scope\":$(scopeid(w)),\"id\":$(obsid(ob)),\"type\":\"observable\"}"
8080

81-
@test @js($ob[]) == js"WebIO.getval({\"name\":\"test\",\"scope\":$(scopeid(w)),\"id\":\"ob_02\",\"type\":\"observable\"})"
82-
@test @js($ob[] = 1) == js"WebIO.setval({\"name\":\"test\",\"scope\":$(scopeid(w)),\"id\":\"ob_02\",\"type\":\"observable\"},1)"
81+
@test @js($ob[]) == js"WebIO.getval({\"name\":\"test\",\"scope\":$(scopeid(w)),\"id\":$(obsid(ob)),\"type\":\"observable\"})"
82+
@test @js($ob[] = 1) == js"WebIO.setval({\"name\":\"test\",\"scope\":$(scopeid(w)),\"id\":$(obsid(ob)),\"type\":\"observable\"},1)"
8383
end
8484
end

0 commit comments

Comments
 (0)