Skip to content

Commit 8768afd

Browse files
committed
Remove JSExpr from test dependencies.
1 parent 1e1a273 commit 8768afd

File tree

3 files changed

+13
-11
lines changed

3 files changed

+13
-11
lines changed

test/REQUIRE

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
Blink 0.8.0
22
Mux 0.5.1
3-
JSExpr
43
IJulia
54
NBInclude 2.0.0
65
NodeJS

test/blink-tests.jl

Lines changed: 12 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
using WebIO
22
using Blink
33
using Observables
4-
using JSExpr
54
using Test
65

76
notinstalled = !AtomShell.isinstalled()
@@ -46,9 +45,11 @@ end
4645
end
4746

4847
julia_to_js = Observable(scope, "outbox", "")
49-
onjs(julia_to_js, @JSExpr.js function (val)
50-
$js_to_julia[] = val
51-
end)
48+
onjs(julia_to_js, js"""
49+
function (val) {
50+
_webIOScope.setObservableValue("inbox", val);
51+
}
52+
""")
5253

5354
# Render the scope into the Blink window
5455
body!(w, scope)
@@ -68,9 +69,13 @@ end
6869
# Put the result in a channel so we can watch for it
6970
put!(output, x)
7071
end
71-
onimport(scope, @JSExpr.js function (mod)
72-
$js_to_julia[] = mod.x
73-
end)
72+
onimport(
73+
scope,
74+
js"""
75+
function (mod) {
76+
_webIOScope.setObservableValue("inbox", mod.x);
77+
}
78+
""")
7479
if use_iframe
7580
body!(w, iframe(scope))
7681
else

test/http-tests.jl

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
using WebIO
22
using WebSockets
3-
using JSExpr
43
using Test
54

65
@testset "HTTP provider" begin
@@ -37,7 +36,6 @@ function serve_app(req)
3736
end
3837
end
3938
server = WebIO.WebIOServer(serve_app, logger = stdout, verbose = true)
40-
using JSExpr
4139
WebIO.wio_asseturl("/webio/dist/bundle.js")
4240
server.serve_task
4341

@@ -52,6 +50,6 @@ end
5250
app[] = w(
5351
dom"button"(
5452
"generate random",
55-
events=Dict("click"=>@js () -> $obs[] = Math.random()),
53+
events=Dict("click" => js"""function() { _webIOScope.setObservableValue('rand-value', Math.random()); }"""),
5654
),
5755
);

0 commit comments

Comments
 (0)