From 145772476b2878deb54cb2a07d2d7f6036eadbbf Mon Sep 17 00:00:00 2001 From: Florian Bruhin Date: Sun, 15 Nov 2015 12:23:34 +0100 Subject: [PATCH] bdd: Add some tests for :jseval. --- tests/integration/features/misc.feature | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/tests/integration/features/misc.feature b/tests/integration/features/misc.feature index 1be4f137b..659df468e 100644 --- a/tests/integration/features/misc.feature +++ b/tests/integration/features/misc.feature @@ -54,3 +54,23 @@ Feature: Various utility commands. And I run :jseval console.log("Hello from JS!"); And I wait for "[:0] Hello from JS!" in the log Then the message "No output or error" should be shown. + + Scenario: :jseval without logging + When I set general -> log-javascript-console to false + And I run :jseval console.log("Hello from JS!"); + Then the message "No output or error" should be shown. + And "[:0] Hello from JS!" should not be logged + + Scenario: :jseval with --quiet + When I set general -> log-javascript-console to true + And I run :jseval --quiet console.log("Hello from JS!"); + And I wait for "[:0] Hello from JS!" in the log + Then "No output or error" should not be logged + + Scenario: :jseval with a value + When I run :jseval "foo" + Then the message "foo" should be shown. + + Scenario: :jseval with a long, truncated value + When I run :jseval Array(5002).join("x") + Then the message "x* [...trimmed...]" should be shown.