Configure logging with the JVM Test Suite Plugin

I can’t get Gradle to be happy with that. This is for the built-in test task. My configuration currently is

testing {
	suites {
		test {
			useJUnitJupiter()
			dependencies {
				implementation project()

				// Provides JUnit, Spring Test, AssertJ, Hamcrest, Mockito, JSONassert, & JsonPath
				implementation "org.springframework.boot:spring-boot-starter-test"
			}

			targets.configureEach {
				testTask {
					testLogging {
						events = ['FAILED', 'SKIPPED']
						exceptionFormat = 'full'
					}
				}
			}
		}
	}
}

With this, I get the error message Could not find method testTask() for arguments [build_1fh1351cdm5238ctn1qga65kf$_run_closure12$_closure36$_closure37$_closure39$_closure40@3a5df386] on object of type org.gradle.api.plugins.jvm.internal.DefaultJvmTestSuiteTarget.. I tried changing testTask to just test but that resulted in what seems to be a very similar error message: Could not find method testLogging() for arguments [build_1fh1351cdm5238ctn1qga65kf$_run_closure12$_closure36$_closure37$_closure39$_closure40$_closure41@19b06964] on object of type org.gradle.api.plugins.jvm.internal.DefaultJvmTestSuite.