diff --git a/R/mock-session.R b/R/mock-session.R index 91538b01b2..4b79a73b61 100644 --- a/R/mock-session.R +++ b/R/mock-session.R @@ -420,7 +420,6 @@ MockShinySession <- R6Class( #' @param value The value returned from the module setReturned = function(value) { self$returned <- value - private$flush() value }, #' @description Get the value returned by the module call. @@ -461,4 +460,3 @@ MockShinySession <- R6Class( } ) ) - diff --git a/tests/testthat/test-test-server.R b/tests/testthat/test-test-server.R index 23866c4898..ce3ea1d64a 100644 --- a/tests/testthat/test-test-server.R +++ b/tests/testthat/test-test-server.R @@ -165,6 +165,7 @@ test_that("testServer handles reactivePoll", { } testServer(module, { + session$flushReact() expect_equal(rv$x, 1) for (i in 1:4){ @@ -189,6 +190,7 @@ test_that("testServer handles reactiveTimer", { } testServer(module, { + session$flushReact() expect_equal(rv$x, 1) session$elapse(200) @@ -593,6 +595,7 @@ test_that("testServer handles invalidateLater", { } testServer(module, { + session$flushReact() # Should have run once expect_equal(rv$x, 1)