Skip to content

Commit 76237d5

Browse files
author
hhaensel
committed
support kwargs in notify_test()
1 parent 6b8bb4e commit 76237d5

1 file changed

Lines changed: 7 additions & 7 deletions

File tree

src/GenieTest.jl

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -442,21 +442,21 @@ function wait_for(f; success = true, fail = false, timeout::Real = 10, delay::Re
442442
f() ? success : fail
443443
end
444444
445-
function notify_test(model::ReactiveModel, test::Test.Result, test_str::AbstractString = "Test")
445+
function notify_test(model::ReactiveModel, test::Test.Result, test_str::AbstractString = "Test"; kwargs...)
446446
success = test isa Test.Pass
447-
notify(model, "$test_str $(success ? "succeeded!" : "failed!")", type = success ? "positive" : "negative")
447+
notify(model, "$test_str $(success ? "succeeded!" : "failed!")", type = success ? "positive" : "negative"; kwargs...)
448448
end
449449
450-
function notify_test(win::Window, test::Test.Result, test_str::AbstractString = "Test")
450+
function notify_test(win::Window, test::Test.Result, test_str::AbstractString = "Test"; kwargs...)
451451
success = test isa Test.Pass
452-
notify(win, "$test_str $(success ? "succeeded!" : "failed!")", type = success ? "positive" : "negative")
452+
notify(win, "$test_str $(success ? "succeeded!" : "failed!")", type = success ? "positive" : "negative"; kwargs...)
453453
end
454454
455-
function notify_test(app::App, test::Test.Result, test_str::AbstractString = "Test")
455+
function notify_test(app::App, test::Test.Result, test_str::AbstractString = "Test"; kwargs...)
456456
if app.__model__ !== nothing
457-
notify_test(app.__model__, test, test_str)
457+
notify_test(app.__model__, test, test_str; kwargs...)
458458
elseif app.__window__ !== nothing
459-
notify_test(app.__window__, test, test_str)
459+
notify_test(app.__window__, test, test_str; kwargs...)
460460
end
461461
end
462462

0 commit comments

Comments
 (0)