Vampire commented on code in PR #275:
URL: https://github.com/apache/groovy-geb/pull/275#discussion_r2167372697


##########
doc/manual-snippets/src/test/groovy/javascript/ExecutingArbitraryCodeSpec.groovy:
##########
@@ -50,4 +50,25 @@ class ExecutingArbitraryCodeSpec extends 
GebSpecWithCallbackServer {
         """
         // end::multiline[]
     }
+
+    def "closure"() {
+        given:
+        html {
+            script(type: "text/javascript", """
+                function someJsMethod(a,b) {
+                }
+            """)
+        }
+
+        expect:
+        // tag::closure[]
+        js.exec(1, 2) {
+            """
+                someJsMethod(1, 2);

Review Comment:
   Yeah, why not, I just copied the `multiline` example from above, but not 
adjusted both.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to