summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSho Sakuma <me@m1sk9.dev>2026-03-26 07:29:21 +0900
committerSho Sakuma <me@m1sk9.dev>2026-03-26 08:12:33 +0900
commit50ecc1136d87767f9dc522e57d34a0ff6ead6b81 (patch)
treea8fc010eb56fc35917ecafbcf29cefa123189e90
parente0d1f7a9bc9122d02de829a28a51b9aec8611fa5 (diff)
parent217b8b38a757db04babd645e39f2c9e1846b40f0 (diff)
downloadLunaticChat-50ecc1136d87767f9dc522e57d34a0ff6ead6b81.tar.gz
LunaticChat-50ecc1136d87767f9dc522e57d34a0ff6ead6b81.tar.bz2
LunaticChat-50ecc1136d87767f9dc522e57d34a0ff6ead6b81.zip
Merge branch 'main' into ci/support-nightly-release
-rw-r--r--.github/CONTRIBUTING.md2
-rw-r--r--.github/workflows/ci.yaml4
-rw-r--r--.github/workflows/docs.yaml2
-rw-r--r--.github/workflows/dokka.yaml2
-rw-r--r--.github/workflows/release.yaml2
-rw-r--r--README.md4
-rw-r--r--codecov.yml5
-rw-r--r--docs/biome.jsonc2
-rw-r--r--docs/bun.lock20
-rw-r--r--docs/package.json2
-rw-r--r--gradle/wrapper/gradle-wrapper.properties2
-rwxr-xr-xgradlew2
-rw-r--r--mise.toml2
-rw-r--r--platform-paper/src/main/kotlin/dev/m1sk9/lunaticChat/paper/command/impl/lc/StatusCommand.kt7
-rw-r--r--platform-paper/src/main/kotlin/dev/m1sk9/lunaticChat/paper/command/impl/lcv/VelocityStatusCommand.kt8
-rw-r--r--platform-paper/src/main/kotlin/dev/m1sk9/lunaticChat/paper/listener/PlayerPresenceListener.kt13
-rw-r--r--platform-paper/src/test/kotlin/dev/m1sk9/lunaticChat/paper/command/impl/lc/StatusCommandTest.kt39
17 files changed, 81 insertions, 37 deletions
diff --git a/.github/CONTRIBUTING.md b/.github/CONTRIBUTING.md
index 09ebb81..5489c70 100644
--- a/.github/CONTRIBUTING.md
+++ b/.github/CONTRIBUTING.md
@@ -8,7 +8,7 @@ For questions, see the [discussion](https://github.com/m1sk9/LunaticChat/discuss
## Reporting Bugs / Requesting Features
-Before reporting a bug or requesting a feature, please search the [issues]().
+Before reporting a bug or requesting a feature, please search the [issues](https://github.com/m1sk9/LunaticChat/issues).
If your issue is not already reported, please create a new issue using the provided template. Be sure to include as much detail as possible, including steps to reproduce the issue if applicable.
diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml
index 347f859..e1ebe19 100644
--- a/.github/workflows/ci.yaml
+++ b/.github/workflows/ci.yaml
@@ -20,7 +20,7 @@ jobs:
uses: actions/checkout@v6
- name: Setup Development Environment
- uses: jdx/mise-action@v3
+ uses: jdx/mise-action@v4
- name: Setup Gradle
uses: gradle/actions/setup-gradle@v5
@@ -68,7 +68,7 @@ jobs:
uses: actions/checkout@v6
- name: Setup Development Environment
- uses: jdx/mise-action@v3
+ uses: jdx/mise-action@v4
with:
working_directory: .
diff --git a/.github/workflows/docs.yaml b/.github/workflows/docs.yaml
index c4643bd..958855e 100644
--- a/.github/workflows/docs.yaml
+++ b/.github/workflows/docs.yaml
@@ -22,7 +22,7 @@ jobs:
uses: actions/checkout@v6
- name: Setup Development Environment
- uses: jdx/mise-action@v3
+ uses: jdx/mise-action@v4
with:
working_directory: .
diff --git a/.github/workflows/dokka.yaml b/.github/workflows/dokka.yaml
index 9f79ef2..88115fd 100644
--- a/.github/workflows/dokka.yaml
+++ b/.github/workflows/dokka.yaml
@@ -23,7 +23,7 @@ jobs:
uses: actions/checkout@v6
- name: Setup Development Environment
- uses: jdx/mise-action@v3
+ uses: jdx/mise-action@v4
- name: Setup Gradle
uses: gradle/actions/setup-gradle@v5
diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml
index c134538..f0da20c 100644
--- a/.github/workflows/release.yaml
+++ b/.github/workflows/release.yaml
@@ -55,7 +55,7 @@ jobs:
uses: actions/checkout@v6
- name: Setup Development Environment
- uses: jdx/mise-action@v3
+ uses: jdx/mise-action@v4
- name: Setup Gradle
uses: gradle/actions/setup-gradle@v5
diff --git a/README.md b/README.md
index faf3877..9b404b3 100644
--- a/README.md
+++ b/README.md
@@ -19,7 +19,7 @@ cd LunaticChat
./gradlew shadowJar
```
-_[Supports Minecraft 1.21.11](https://minecraft.wiki/w/Java_Edition_version_history#1.21) | [Requires Java 21+ and Gradle 9+](.github/CONTRIBUTING.md#開発環境)_
+_[Supports Minecraft 1.21.11](https://minecraft.wiki/w/Java_Edition_version_history#1.21) | [Requires Java 21+ and Gradle 9+](.github/CONTRIBUTING.md)_
## Installation
@@ -34,7 +34,7 @@ Pre-built artifacts can be installed from the following locations. Place the dow
- [GitHub](https://github.com/m1sk9/LunaticChat/releases)
- [Modrinth](https://modrinth.com/project/lunaticchat)
-See the [Documentation](https://lc.m1sk9.dev/guide/getting-started).
+See the [Documentation](https://lc.m1sk9.dev/player-guide/getting-started).
## Features
diff --git a/codecov.yml b/codecov.yml
index 9bc314e..822b43f 100644
--- a/codecov.yml
+++ b/codecov.yml
@@ -16,3 +16,8 @@ ignore:
# Listener classes are tightly coupled to the Paper/Minecraft runtime and exercised via
# end-to-end/server tests, so we exclude them from unit-test coverage metrics.
- "platform-paper/src/main/kotlin/dev/m1sk9/lunaticChat/paper/listener/**"
+ # BuildInfo loads build-time resources at class init and is verified via integration tests.
+ - "platform-paper/src/main/kotlin/dev/m1sk9/lunaticChat/paper/BuildInfo.kt"
+ # The Velocity platform has no unit-test infrastructure; it is exercised via end-to-end
+ # multi-server tests (docker compose).
+ - "platform-velocity/src/main/kotlin/**"
diff --git a/docs/biome.jsonc b/docs/biome.jsonc
index 11c2c25..015aedf 100644
--- a/docs/biome.jsonc
+++ b/docs/biome.jsonc
@@ -1,5 +1,5 @@
{
- "$schema": "https://biomejs.dev/schemas/2.4.7/schema.json",
+ "$schema": "https://biomejs.dev/schemas/2.4.9/schema.json",
"files": {
"ignoreUnknown": true,
"includes": [
diff --git a/docs/bun.lock b/docs/bun.lock
index d90b4f6..5534bd9 100644
--- a/docs/bun.lock
+++ b/docs/bun.lock
@@ -8,7 +8,7 @@
"wrangler": "^4.69.0",
},
"devDependencies": {
- "@biomejs/biome": "2.4.7",
+ "@biomejs/biome": "2.4.9",
"husky": "^9.1.7",
"vitepress": "^1.6.4",
},
@@ -59,23 +59,23 @@
"@babel/types": ["@babel/types@7.29.0", "", { "dependencies": { "@babel/helper-string-parser": "^7.27.1", "@babel/helper-validator-identifier": "^7.28.5" } }, "sha512-LwdZHpScM4Qz8Xw2iKSzS+cfglZzJGvofQICy7W7v4caru4EaAmyUuO6BGrbyQ2mYV11W0U8j5mBhd14dd3B0A=="],
- "@biomejs/biome": ["@biomejs/biome@2.4.7", "", { "optionalDependencies": { "@biomejs/cli-darwin-arm64": "2.4.7", "@biomejs/cli-darwin-x64": "2.4.7", "@biomejs/cli-linux-arm64": "2.4.7", "@biomejs/cli-linux-arm64-musl": "2.4.7", "@biomejs/cli-linux-x64": "2.4.7", "@biomejs/cli-linux-x64-musl": "2.4.7", "@biomejs/cli-win32-arm64": "2.4.7", "@biomejs/cli-win32-x64": "2.4.7" }, "bin": { "biome": "bin/biome" } }, "sha512-vXrgcmNGZ4lpdwZSpMf1hWw1aWS6B+SyeSYKTLrNsiUsAdSRN0J4d/7mF3ogJFbIwFFSOL3wT92Zzxia/d5/ng=="],
+ "@biomejs/biome": ["@biomejs/biome@2.4.9", "", { "optionalDependencies": { "@biomejs/cli-darwin-arm64": "2.4.9", "@biomejs/cli-darwin-x64": "2.4.9", "@biomejs/cli-linux-arm64": "2.4.9", "@biomejs/cli-linux-arm64-musl": "2.4.9", "@biomejs/cli-linux-x64": "2.4.9", "@biomejs/cli-linux-x64-musl": "2.4.9", "@biomejs/cli-win32-arm64": "2.4.9", "@biomejs/cli-win32-x64": "2.4.9" }, "bin": { "biome": "bin/biome" } }, "sha512-wvZW92FrwitTcacvCBT8xdAbfbxWfDLwjYMmU3djjqQTh7Ni4ZdiWIT/x5VcZ+RQuxiKzIOzi5D+dcyJDFZMsA=="],
- "@biomejs/cli-darwin-arm64": ["@biomejs/cli-darwin-arm64@2.4.7", "", { "os": "darwin", "cpu": "arm64" }, "sha512-Oo0cF5mHzmvDmTXw8XSjhCia8K6YrZnk7aCS54+/HxyMdZMruMO3nfpDsrlar/EQWe41r1qrwKiCa2QDYHDzWA=="],
+ "@biomejs/cli-darwin-arm64": ["@biomejs/cli-darwin-arm64@2.4.9", "", { "os": "darwin", "cpu": "arm64" }, "sha512-d5G8Gf2RpH5pYwiHLPA+UpG3G9TLQu4WM+VK6sfL7K68AmhcEQ9r+nkj/DvR/GYhYox6twsHUtmWWWIKfcfQQA=="],
- "@biomejs/cli-darwin-x64": ["@biomejs/cli-darwin-x64@2.4.7", "", { "os": "darwin", "cpu": "x64" }, "sha512-I+cOG3sd/7HdFtvDSnF9QQPrWguUH7zrkIMMykM3PtfWU9soTcS2yRb9Myq6MHmzbeCT08D1UmY+BaiMl5CcoQ=="],
+ "@biomejs/cli-darwin-x64": ["@biomejs/cli-darwin-x64@2.4.9", "", { "os": "darwin", "cpu": "x64" }, "sha512-LNCLNgqDMG7BLdc3a8aY/dwKPK7+R8/JXJoXjCvZh2gx8KseqBdFDKbhrr7HCWF8SzNhbTaALhTBoh/I6rf9lA=="],
- "@biomejs/cli-linux-arm64": ["@biomejs/cli-linux-arm64@2.4.7", "", { "os": "linux", "cpu": "arm64" }, "sha512-om6FugwmibzfP/6ALj5WRDVSND4H2G9X0nkI1HZpp2ySf9lW2j0X68oQSaHEnls6666oy4KDsc5RFjT4m0kV0w=="],
+ "@biomejs/cli-linux-arm64": ["@biomejs/cli-linux-arm64@2.4.9", "", { "os": "linux", "cpu": "arm64" }, "sha512-4adnkAUi6K4C/emPRgYznMOcLlUqZdXWM6aIui4VP4LraE764g6Q4YguygnAUoxKjKIXIWPteKMgRbN0wsgwcg=="],
- "@biomejs/cli-linux-arm64-musl": ["@biomejs/cli-linux-arm64-musl@2.4.7", "", { "os": "linux", "cpu": "arm64" }, "sha512-I2NvM9KPb09jWml93O2/5WMfNR7Lee5Latag1JThDRMURVhPX74p9UDnyTw3Ae6cE1DgXfw7sqQgX7rkvpc0vw=="],
+ "@biomejs/cli-linux-arm64-musl": ["@biomejs/cli-linux-arm64-musl@2.4.9", "", { "os": "linux", "cpu": "arm64" }, "sha512-8RCww5xnPn2wpK4L/QDGDOW0dq80uVWfppPxHIUg6mOs9B6gRmqPp32h1Ls3T8GnW8Wo5A8u7vpTwz4fExN+sw=="],
- "@biomejs/cli-linux-x64": ["@biomejs/cli-linux-x64@2.4.7", "", { "os": "linux", "cpu": "x64" }, "sha512-bV8/uo2Tj+gumnk4sUdkerWyCPRabaZdv88IpbmDWARQQoA/Q0YaqPz1a+LSEDIL7OfrnPi9Hq1Llz4ZIGyIQQ=="],
+ "@biomejs/cli-linux-x64": ["@biomejs/cli-linux-x64@2.4.9", "", { "os": "linux", "cpu": "x64" }, "sha512-L10na7POF0Ks/cgLFNF1ZvIe+X4onLkTi5oP9hY+Rh60Q+7fWzKDDCeGyiHUFf1nGIa9dQOOUPGe2MyYg8nMSQ=="],
- "@biomejs/cli-linux-x64-musl": ["@biomejs/cli-linux-x64-musl@2.4.7", "", { "os": "linux", "cpu": "x64" }, "sha512-00kx4YrBMU8374zd2wHuRV5wseh0rom5HqRND+vDldJPrWwQw+mzd/d8byI9hPx926CG+vWzq6AeiT7Yi5y59g=="],
+ "@biomejs/cli-linux-x64-musl": ["@biomejs/cli-linux-x64-musl@2.4.9", "", { "os": "linux", "cpu": "x64" }, "sha512-5TD+WS9v5vzXKzjetF0hgoaNFHMcpQeBUwKKVi3JbG1e9UCrFuUK3Gt185fyTzvRdwYkJJEMqglRPjmesmVv4A=="],
- "@biomejs/cli-win32-arm64": ["@biomejs/cli-win32-arm64@2.4.7", "", { "os": "win32", "cpu": "arm64" }, "sha512-hOUHBMlFCvDhu3WCq6vaBoG0dp0LkWxSEnEEsxxXvOa9TfT6ZBnbh72A/xBM7CBYB7WgwqboetzFEVDnMxelyw=="],
+ "@biomejs/cli-win32-arm64": ["@biomejs/cli-win32-arm64@2.4.9", "", { "os": "win32", "cpu": "arm64" }, "sha512-aDZr0RBC3sMGJOU10BvG7eZIlWLK/i51HRIfScE2lVhfts2dQTreowLiJJd+UYg/tHKxS470IbzpuKmd0MiD6g=="],
- "@biomejs/cli-win32-x64": ["@biomejs/cli-win32-x64@2.4.7", "", { "os": "win32", "cpu": "x64" }, "sha512-qEpGjSkPC3qX4ycbMUthXvi9CkRq7kZpkqMY1OyhmYlYLnANnooDQ7hDerM8+0NJ+DZKVnsIc07h30XOpt7LtQ=="],
+ "@biomejs/cli-win32-x64": ["@biomejs/cli-win32-x64@2.4.9", "", { "os": "win32", "cpu": "x64" }, "sha512-NS4g/2G9SoQ4ktKtz31pvyc/rmgzlcIDCGU/zWbmHJAqx6gcRj2gj5Q/guXhoWTzCUaQZDIqiCQXHS7BcGYc0w=="],
"@cloudflare/kv-asset-handler": ["@cloudflare/kv-asset-handler@0.4.2", "", {}, "sha512-SIOD2DxrRRwQ+jgzlXCqoEFiKOFqaPjhnNTGKXSRLvp1HiOvapLaFG2kEr9dYQTYe8rKrd9uvDUzmAITeNyaHQ=="],
diff --git a/docs/package.json b/docs/package.json
index dd05387..bc296be 100644
--- a/docs/package.json
+++ b/docs/package.json
@@ -11,7 +11,7 @@
"deploy": "wrangler deploy"
},
"devDependencies": {
- "@biomejs/biome": "2.4.7",
+ "@biomejs/biome": "2.4.9",
"husky": "^9.1.7",
"vitepress": "^1.6.4"
},
diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties
index dbc3ce4..c61a118 100644
--- a/gradle/wrapper/gradle-wrapper.properties
+++ b/gradle/wrapper/gradle-wrapper.properties
@@ -1,6 +1,6 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
-distributionUrl=https\://services.gradle.org/distributions/gradle-9.4.0-bin.zip
+distributionUrl=https\://services.gradle.org/distributions/gradle-9.4.1-bin.zip
networkTimeout=10000
validateDistributionUrl=true
zipStoreBase=GRADLE_USER_HOME
diff --git a/gradlew b/gradlew
index 0262dcb..739907d 100755
--- a/gradlew
+++ b/gradlew
@@ -57,7 +57,7 @@
# Darwin, MinGW, and NonStop.
#
# (3) This script is generated from the Groovy template
-# https://github.com/gradle/gradle/blob/b631911858264c0b6e4d6603d677ff5218766cee/platforms/jvm/plugins-application/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt
+# https://github.com/gradle/gradle/blob/2d6327017519d23b96af35865dc997fcb544fb40/platforms/jvm/plugins-application/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt
# within the Gradle project.
#
# You can find Gradle at https://github.com/gradle/gradle/.
diff --git a/mise.toml b/mise.toml
index e5f12b9..99e9d53 100644
--- a/mise.toml
+++ b/mise.toml
@@ -1,3 +1,3 @@
[tools]
-bun = "1.3.10"
+bun = "1.3.11"
java = "zulu-21.48.17.0"
diff --git a/platform-paper/src/main/kotlin/dev/m1sk9/lunaticChat/paper/command/impl/lc/StatusCommand.kt b/platform-paper/src/main/kotlin/dev/m1sk9/lunaticChat/paper/command/impl/lc/StatusCommand.kt
index 3a4149c..6b6fd09 100644
--- a/platform-paper/src/main/kotlin/dev/m1sk9/lunaticChat/paper/command/impl/lc/StatusCommand.kt
+++ b/platform-paper/src/main/kotlin/dev/m1sk9/lunaticChat/paper/command/impl/lc/StatusCommand.kt
@@ -104,8 +104,11 @@ class StatusCommand(
// Nightly warning
if (BuildInfo.isNightly) {
- sendMessage(MessageFormatter.format(languageManager.getMessage("general.nightlyWarning"))
- .color(NamedTextColor.YELLOW))
+ sendMessage(
+ MessageFormatter
+ .format(languageManager.getMessage("general.nightlyWarning"))
+ .color(NamedTextColor.YELLOW),
+ )
}
sendMessage(healthLine)
diff --git a/platform-paper/src/main/kotlin/dev/m1sk9/lunaticChat/paper/command/impl/lcv/VelocityStatusCommand.kt b/platform-paper/src/main/kotlin/dev/m1sk9/lunaticChat/paper/command/impl/lcv/VelocityStatusCommand.kt
index 9e926fc..439a29a 100644
--- a/platform-paper/src/main/kotlin/dev/m1sk9/lunaticChat/paper/command/impl/lcv/VelocityStatusCommand.kt
+++ b/platform-paper/src/main/kotlin/dev/m1sk9/lunaticChat/paper/command/impl/lcv/VelocityStatusCommand.kt
@@ -16,7 +16,6 @@ import dev.m1sk9.lunaticChat.paper.velocity.VelocityConnectionManager
import io.papermc.paper.command.brigadier.CommandSourceStack
import io.papermc.paper.command.brigadier.Commands
import net.kyori.adventure.text.Component
-import net.kyori.adventure.text.event.ClickEvent
import net.kyori.adventure.text.event.HoverEvent
import net.kyori.adventure.text.format.NamedTextColor
@@ -143,8 +142,11 @@ class VelocityStatusCommand(
// Nightly warning
if (BuildInfo.isNightly) {
- sendMessage(MessageFormatter.format(languageManager.getMessage("general.nightlyWarning"))
- .color(NamedTextColor.YELLOW))
+ sendMessage(
+ MessageFormatter
+ .format(languageManager.getMessage("general.nightlyWarning"))
+ .color(NamedTextColor.YELLOW),
+ )
}
// Connection status details
diff --git a/platform-paper/src/main/kotlin/dev/m1sk9/lunaticChat/paper/listener/PlayerPresenceListener.kt b/platform-paper/src/main/kotlin/dev/m1sk9/lunaticChat/paper/listener/PlayerPresenceListener.kt
index 86a8519..fc79ffe 100644
--- a/platform-paper/src/main/kotlin/dev/m1sk9/lunaticChat/paper/listener/PlayerPresenceListener.kt
+++ b/platform-paper/src/main/kotlin/dev/m1sk9/lunaticChat/paper/listener/PlayerPresenceListener.kt
@@ -8,7 +8,6 @@ import dev.m1sk9.lunaticChat.paper.common.hasAnyPermission
import dev.m1sk9.lunaticChat.paper.i18n.LanguageManager
import dev.m1sk9.lunaticChat.paper.i18n.MessageFormatter
import dev.m1sk9.lunaticChat.paper.settings.PlayerSettingsManager
-import net.kyori.adventure.text.Component
import net.kyori.adventure.text.event.ClickEvent
import net.kyori.adventure.text.format.NamedTextColor
import org.bukkit.event.EventHandler
@@ -46,12 +45,16 @@ class PlayerPresenceListener(
if (BuildInfo.isNightly) {
lunaticChat.server.asyncScheduler.runDelayed(lunaticChat, { _ ->
if (player.isOnline) {
- player.sendMessage(MessageFormatter.format(languageManager.getMessage("general.nightlyWarning"))
- .color(NamedTextColor.YELLOW))
player.sendMessage(
- MessageFormatter.format(languageManager.getMessage("general.nightlyReportIssue"))
+ MessageFormatter
+ .format(languageManager.getMessage("general.nightlyWarning"))
+ .color(NamedTextColor.YELLOW),
+ )
+ player.sendMessage(
+ MessageFormatter
+ .format(languageManager.getMessage("general.nightlyReportIssue"))
.clickEvent(ClickEvent.openUrl("https://github.com/m1sk9/LunaticChat/issues"))
- .color(NamedTextColor.YELLOW)
+ .color(NamedTextColor.YELLOW),
)
}
}, 6, TimeUnit.SECONDS)
diff --git a/platform-paper/src/test/kotlin/dev/m1sk9/lunaticChat/paper/command/impl/lc/StatusCommandTest.kt b/platform-paper/src/test/kotlin/dev/m1sk9/lunaticChat/paper/command/impl/lc/StatusCommandTest.kt
index 95c8b92..039b135 100644
--- a/platform-paper/src/test/kotlin/dev/m1sk9/lunaticChat/paper/command/impl/lc/StatusCommandTest.kt
+++ b/platform-paper/src/test/kotlin/dev/m1sk9/lunaticChat/paper/command/impl/lc/StatusCommandTest.kt
@@ -45,13 +45,25 @@ class StatusCommandTest {
val mockPlayer: org.bukkit.entity.Player,
)
+ private fun mockBuildInfoStable() {
+ every { BuildInfo.versionWithCommit() } returns "0.10.0-test"
+ every { BuildInfo.isNightly } returns false
+ every { BuildInfo.channel } returns "stable"
+ }
+
+ private fun mockBuildInfoNightly() {
+ every { BuildInfo.versionWithCommit() } returns "0.10.0-nightly.1-test"
+ every { BuildInfo.isNightly } returns true
+ every { BuildInfo.channel } returns "nightly"
+ }
+
@Test
fun `execute should return Success`() {
val deps = createDependencies()
mockkObject(BuildInfo)
try {
- every { BuildInfo.versionWithCommit() } returns "0.10.0-test"
+ mockBuildInfoStable()
val result = deps.command.execute(deps.ctx)
@@ -67,7 +79,7 @@ class StatusCommandTest {
mockkObject(BuildInfo)
try {
- every { BuildInfo.versionWithCommit() } returns "0.10.0-test"
+ mockBuildInfoStable()
deps.command.execute(deps.ctx)
@@ -96,7 +108,7 @@ class StatusCommandTest {
mockkObject(BuildInfo)
try {
- every { BuildInfo.versionWithCommit() } returns "0.10.0-test"
+ mockBuildInfoStable()
val result = deps.command.execute(deps.ctx)
@@ -112,7 +124,7 @@ class StatusCommandTest {
mockkObject(BuildInfo)
try {
- every { BuildInfo.versionWithCommit() } returns "0.10.0-test"
+ mockBuildInfoStable()
deps.command.execute(deps.ctx)
@@ -122,4 +134,23 @@ class StatusCommandTest {
unmockkObject(BuildInfo)
}
}
+
+ @Test
+ fun `execute with nightly build should display nightly warning and channel`() {
+ val deps = createDependencies()
+
+ mockkObject(BuildInfo)
+ try {
+ mockBuildInfoNightly()
+
+ val result = deps.command.execute(deps.ctx)
+
+ assertIs<CommandResult.Success>(result)
+ // Nightly warning + version + health + features header + 4 features + config header +
+ // debug + checkForUpdates + releaseChannel + language + 3 links = at least 15 messages
+ verify(atLeast = 5) { deps.mockPlayer.sendMessage(any<Component>()) }
+ } finally {
+ unmockkObject(BuildInfo)
+ }
+ }
}