Skip to content

Commit

Permalink
[TEST] Fix wasm test
Browse files Browse the repository at this point in the history
[CHORE] pipeline jvm 17
  • Loading branch information
edna-aa committed Dec 29, 2023
1 parent 2f5d92f commit 040fd01
Show file tree
Hide file tree
Showing 7 changed files with 27 additions and 2 deletions.
4 changes: 3 additions & 1 deletion .github/workflows/pull_request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
- name: "Setup Java"
uses: actions/setup-java@v1
with:
java-version: 11
java-version: 17

- name: Run common tests
run: ./gradlew :napier:test --stacktrace
Expand All @@ -42,6 +42,8 @@ jobs:
run: ./gradlew :napier:tvosX64Test --stacktrace
- name: Run tvos(apple silicon) tests
run: ./gradlew :napier:tvosSimulatorArm64Test --stacktrace
- name: Run wasmJs tests
run: ./gradlew :napier:wasmJsTest --stacktrace

- name: Bundle the build report
if: failure()
Expand Down
2 changes: 1 addition & 1 deletion buildSrc/src/main/kotlin/dependencies/Dep.kt
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ object Dep {
}

object Coroutines {
private const val version = "1.7.3"
private const val version = "1.8.0-RC2"

const val core = "org.jetbrains.kotlinx:kotlinx-coroutines-core:$version"
}
Expand Down
10 changes: 10 additions & 0 deletions napier/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,16 @@ kotlin {
implementation(Dep.Test.js)
}
}
val wasmJsMain by getting {
dependencies {
implementation(Dep.Kotlin.js)
}
}
val wasmJsTest by getting {
dependencies {
implementation(Dep.Test.js)
}
}
val jvmMain by getting {
dependencies {
implementation(Dep.Kotlin.jvm)
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
package io.github.aakira.napier

class NapierJsTest {
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
package io.github.aakira.napier

import kotlinx.coroutines.GlobalScope
import kotlinx.coroutines.promise
import kotlin.coroutines.EmptyCoroutineContext

actual fun <T> testRunBlocking(block: suspend () -> T) {
GlobalScope.promise(EmptyCoroutineContext) { block() }
}

0 comments on commit 040fd01

Please sign in to comment.