Skip to content

Commit

Permalink
initialize napier using global test config
Browse files Browse the repository at this point in the history
  • Loading branch information
JesusMcCloud committed Dec 22, 2023
1 parent f0b797a commit 0c6ce78
Show file tree
Hide file tree
Showing 10 changed files with 32 additions and 14 deletions.
2 changes: 1 addition & 1 deletion kmp-crypto
10 changes: 10 additions & 0 deletions vclib-aries/src/commonTest/kotlin/KotestConfig.kt
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
import io.github.aakira.napier.DebugAntilog
import io.github.aakira.napier.Napier
import io.kotest.core.config.AbstractProjectConfig

object KotestConfig : AbstractProjectConfig() {
init {
Napier.takeLogarithm()
Napier.base(DebugAntilog())
}
}
10 changes: 10 additions & 0 deletions vclib-openid/src/commonTest/kotlin/KotestConfig.kt
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
import io.github.aakira.napier.DebugAntilog
import io.github.aakira.napier.Napier
import io.kotest.core.config.AbstractProjectConfig

object KotestConfig : AbstractProjectConfig() {
init {
Napier.takeLogarithm()
Napier.base(DebugAntilog())
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,6 @@ class OidcSiopIsoProtocolTest : FreeSpec({
lateinit var verifierSiop: OidcSiopVerifier

beforeEach {
Napier.takeLogarithm()
Napier.base(DebugAntilog())
holderCryptoService = DefaultCryptoService()
verifierCryptoService = DefaultCryptoService()
relyingPartyUrl = "https://example.com/rp/${uuid4()}"
Expand Down
9 changes: 9 additions & 0 deletions vclib/src/commonTest/kotlin/KotestConfig.kt
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
import io.github.aakira.napier.DebugAntilog
import io.github.aakira.napier.Napier
import io.kotest.core.config.AbstractProjectConfig

object KotestConfig : AbstractProjectConfig() {
init {
Napier.base(DebugAntilog())
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ import kotlinx.serialization.cbor.ByteStringWrapper

class CoseSerializationTest : FreeSpec({

Napier.base(DebugAntilog())

"Serialization is correct" {
val cose = CoseSigned(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,6 @@ import kotlinx.serialization.encodeToString

class CborSerializationTest : FreeSpec({

beforeSpec {
Napier.base(DebugAntilog())
}

"mDL" {
val mdl = MobileDrivingLicence(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,10 +31,6 @@ import kotlin.random.Random

class IsoMdocTest : FreeSpec({

beforeSpec {
Napier.base(DebugAntilog())
}

"issue, store, present, verify" {
val wallet = Wallet()
val verifier = Verifier()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,6 @@ import kotlinx.datetime.LocalDate

class JsonSerializationTest : FreeSpec({

beforeSpec {
Napier.base(DebugAntilog())
}

// from ISO/IEC 18013-5:2021(E), D4.2.1.1, page 120
"Server Request" {
Expand Down
2 changes: 2 additions & 0 deletions vclib/src/jvmTest/kotlin/KotestConfig.kt
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@


0 comments on commit 0c6ce78

Please sign in to comment.