Skip to content

Commit

Permalink
Mark which abstract flags are JVM only
Browse files Browse the repository at this point in the history
  • Loading branch information
sksamuel committed Mar 10, 2024
1 parent f9b4d94 commit 85e4d1f
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -57,14 +57,14 @@ abstract class AbstractProjectConfig {
* Override this function and return an instance of [SpecExecutionOrder] which will
* be used to sort specs before execution.
*
* Note: This has no effect on non-JVM targets.
* Note: JVM ONLY
*/
open val specExecutionOrder: SpecExecutionOrder? = null

/**
* The [IsolationMode] set here will be applied if the isolation mode in a spec is null.
*
* Note: This is a JVM platform only option.
* Note: JVM ONLY
*/
open val isolationMode: IsolationMode? = null

Expand Down Expand Up @@ -111,6 +111,8 @@ abstract class AbstractProjectConfig {
* Note: For backwards compatibility, setting this value to > 1 will implicitly set
* [concurrentSpecs] to [ProjectConfiguration.MaxConcurrency] unless that option has been explicitly
* set to another value.
*
* Note: JVM ONLY
*/
open val parallelism: Int? = null

Expand All @@ -126,7 +128,7 @@ abstract class AbstractProjectConfig {
* kotest.write.specfailures=true
* ```
*
* Note: This is a JVM platform only option.
* Note: JVM ONLY
*/
open val writeSpecFailureFile: Boolean? = null

Expand Down Expand Up @@ -157,7 +159,7 @@ abstract class AbstractProjectConfig {
* Override this value and set it to false if you want to disable auto-scanning of extensions
* and listeners.
*
* Note: This is a JVM platform only option.
* Note: JVM ONLY
*/
open val autoScanEnabled: Boolean? = null

Expand All @@ -166,7 +168,7 @@ abstract class AbstractProjectConfig {
* [@AutoScan][io.kotest.core.annotation.AutoScan]
* is disabled.
*
* Note: This is a JVM platform only option.
* Note: JVM ONLY
*/
open val autoScanIgnoredClasses: List<KClass<*>> = emptyList()

Expand All @@ -183,9 +185,11 @@ abstract class AbstractProjectConfig {
open val failOnEmptyTestSuite: Boolean? = null

@ExperimentalKotest
// Note: JVM ONLY
open val concurrentSpecs: Int? = null

@ExperimentalKotest
// Note: JVM ONLY
open val concurrentTests: Int? = null

/**
Expand Down Expand Up @@ -238,6 +242,7 @@ abstract class AbstractProjectConfig {

open val testNameAppendTags: Boolean? = null

// Note: JVM ONLY
open val tagInheritance: Boolean? = null

/**
Expand Down Expand Up @@ -265,6 +270,8 @@ abstract class AbstractProjectConfig {

/**
* Set to false if you wish to allow nested jar scanning for tests.
*
* Note: JVM ONLY
*/
open var disableTestNestedJarScanning: Boolean? = null

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ internal fun applyConfigFromProjectConfig(config: AbstractProjectConfig, configu
config.writeSpecFailureFile?.let { configuration.writeSpecFailureFile = it }
config.projectWideFailFast?.let { configuration.projectWideFailFast = it }
config.allowOutOfOrderCallbacks?.let { configuration.allowOutOfOrderCallbacks = it }
config.randomOrderSeed?.let { configuration.randomOrderSeed = it }

// concurrency
config.parallelism?.let { configuration.parallelism = it }
Expand Down Expand Up @@ -54,6 +55,7 @@ internal fun applyConfigFromProjectConfig(config: AbstractProjectConfig, configu
config.logLevel?.let { configuration.logLevel = it }
config.tagInheritance?.let { configuration.tagInheritance = it }


// coroutines
config.coroutineDebugProbes?.let { configuration.coroutineDebugProbes = it }
config.testCoroutineDispatcher.let { configuration.testCoroutineDispatcher = it }
Expand Down

0 comments on commit 85e4d1f

Please sign in to comment.