Skip to content

Commit

Permalink
add onany(update=true) test
Browse files Browse the repository at this point in the history
  • Loading branch information
SimonDanisch committed Nov 6, 2023
1 parent 43f997c commit e2f963a
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions test/runtests.jl
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,16 @@ using Test
@test y[] == 1
end

@testset "onany(f; update=true)" begin
obs = Observable(0)
obs2 = Observable(1)
y = Observable(0)
onany(obs, obs2; update=true) do x
y[] += 1
end
@test y[] == 1
end

@testset "Observable with Priority" begin
po = Observable(0)

Expand Down

0 comments on commit e2f963a

Please sign in to comment.