jonnybot0 commented on code in PR #275:
URL: https://github.com/apache/groovy-geb/pull/275#discussion_r2164771790
##########
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:
Should this example be passing in arguments here, rather than just repeating
`1, 2`?
--
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]