Skip to content

Commit

Permalink
ReactJS: Update GraalJS and take away no longer needed test disables.
Browse files Browse the repository at this point in the history
  • Loading branch information
mikehearn committed Oct 7, 2024
1 parent 74132e4 commit d85e21d
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 12 deletions.
2 changes: 1 addition & 1 deletion gradle/libs.versions.toml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ org-json = "20231013"
managed-thymeleaf = "3.1.2.RELEASE"
managed-velocity = "2.3"

graal = "24.0.1"
graal = "24.0.2"

pebble = "3.2.2"
thymeleaf-extra-java8time = "3.0.4.RELEASE"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
package io.micronaut.views.react

import io.micronaut.context.annotation.Property
import io.micronaut.context.exceptions.BeanInstantiationException
import io.micronaut.core.io.Writable
import io.micronaut.http.exceptions.MessageBodyException
import io.micronaut.test.extensions.spock.annotation.MicronautTest
import jakarta.inject.Inject
import spock.lang.FailsWith
import org.graalvm.polyglot.PolyglotException
import spock.lang.Specification

@MicronautTest(startApplication = false, rebuildContext = true)
Expand All @@ -15,9 +15,6 @@ class SandboxReactRenderSpec extends Specification {
@Inject
ReactViewsRenderer<?> renderer

// The version of GraalJS currently depended on is not compatible with the sandbox. When GraalJS is upgraded,
// this unit test can be enabled.
@FailsWith(BeanInstantiationException)
void "views can be rendered with sandboxing enabled"() {
when:
Writable writable = renderer.render("App", TestProps.basic, null)
Expand All @@ -41,11 +38,8 @@ class SandboxReactRenderSpec extends Specification {
}

then:
// The version of GraalJS currently depended on is not compatible with the sandbox. When GraalJS is upgraded,
// this unit test can be enabled.
thrown(BeanInstantiationException)
// def t = thrown(MessageBodyException)
// t.cause instanceof PolyglotException
// t.cause.message.contains("Java is not defined")
def t = thrown(MessageBodyException)
t.cause instanceof PolyglotException
t.cause.message.contains("Java is not defined")
}
}

0 comments on commit d85e21d

Please sign in to comment.