Skip to content

Conversation

@lqvp
Copy link
Owner

@lqvp lqvp commented Dec 20, 2025

…with tests
resolve: #306

Summary by CodeRabbit

  • 新機能

    • 機能フラグ導入:機能ごとに「デフォルト有効 / オプトイン」を扱う解決ロジックを追加。
  • リファクタ

    • 起動時設定チェックをオプション化:パス解決、ロガー注入、終了処理のカスタマイズ対応でエラーハンドリングを改善。
  • テスト

    • 機能フラグと起動設定チェックの包括的なテストスイートを追加。
  • その他

    • テスト実行フローをビルド後のNodeベース実行へ変更。型定義にNodeを追加。

✏️ Tip: You can customize this high-level summary in your review settings.

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Dec 20, 2025

Note

Other AI code review bot(s) detected

CodeRabbit has detected other AI code review bot(s) in this pull request and will avoid duplicating their findings in the review comments. This may lead to a less comprehensive review.

Walkthrough

設定オブジェクトを InfoFeatureFlags に解決する新モジュールを追加し、info 表示ロジックをそのフラグ参照に切り替え。起動時の設定チェックはロガー/exit 抽象化へ移行し、Jest からビルド後に Node でテストを実行するスクリプトへ変更。関連する単体テストと tsconfig の Node 型追加を含む。

Changes

Cohort / File(s) Change Summary
機能フラグモジュール追加
src/modules/info/feature-flags.ts
新規追加:FeatureFlagsConfig 型、InfoFeatureFlags 型、isEnabledByDefaultUnlessFalse ヘルパ、resolveInfoFeatureFlags(cfg) 実装(デフォルト有効/オプトイン判定をマッピング)
info 表示ロジック更新
src/modules/info/index.ts
resolveInfoFeatureFlags を導入。formatBasicFeatures(flags: InfoFeatureFlags) / formatGameFeatures(flags: InfoFeatureFlags) にシグネチャを変更し、config 直接参照を解決済みフラグへ置換
起動設定チェックの抽象化とリファクタ
src/config-updater.ts
ロガー抽象 (ConfigCheckLogger) とオプション型 (StartupConfigCheckOptions) を追加。パス解決ヘルパ導入、loadConfigTemplate/checkMissingConfigKeys/performStartupConfigCheck をオプション対応へ変更。consoleprocess.exit 呼び出しを注入可能な logger/exit に置換、エラーハンドリング経路を調整
テスト追加 — 機能フラグ
test/info-feature-flags.test.mjs
resolveInfoFeatureFlags の挙動を検証するテストを追加(デフォルト有効/無効、明示 true/false の組合せを網羅)
テスト追加 — config-updater
test/config-updater.test.mjs
checkMissingConfigKeysperformStartupConfigCheck の振る舞いを検証するテストを追加(テンプレート欠如、TOML 解析失敗、正常系、ログ/exit のモック検証、テンポラリファイル使用)
npm スクリプト変更
package.json
test スクリプトを Jest から build && node -r esm -s test/*.test.mjs 相当に切替(ビルド後に Node でテストファイルを直接実行)
TypeScript 設定更新
tsconfig.json
compilerOptions.types"node" を追加して Node.js 型定義を含めるように変更

Sequence Diagram(s)

mermaid
sequenceDiagram
participant Startup as 起動
participant ConfigFS as ファイルシステム (config/template)
participant ConfigChecker as config-updater
participant Logger as 注入された Logger
participant ExitHook as 注入された exit

Startup->>ConfigChecker: performStartupConfigCheck(options)
ConfigChecker->>ConfigFS: load config & template (paths from options)
alt template present
ConfigChecker->>ConfigChecker: checkMissingConfigKeys(parsedConfig, options)
ConfigChecker->>Logger: log missing keys or OK
else template missing or parse error
ConfigChecker->>Logger: error(...)
ConfigChecker->>ExitHook: exit(1)
end
ConfigChecker-->>Startup: return parsed Config

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~45 分

  • 注意箇所:
    • src/modules/info/feature-flags.ts:既定値ロジック(undefined を有効扱いにする箇所)と strict true 判定の差分
    • src/modules/info/index.ts:既存の表示フォーマットが新しい flags 引数で同等に動作するか
    • src/config-updater.ts:logger/exit 注入、パス解決と例外経路(テンプレート欠如や TOML 解析失敗)の取り回し
    • test/config-updater.test.mjs:テンポラリファイル操作と exit モックの安定性
    • package.json の test スクリプト変更が CI や esm ローダー前提に影響する点

Poem

ふわっと跳んだよ、うさぎの僕🐇
フラグを並べて道しるべにするよ
デフォルトはやさしく「On」にして
テストの花もぽんぽん咲いたよ🌼
さぁ新しい朝へぴょんと出発!

Pre-merge checks and finishing touches

❌ Failed checks (1 warning, 1 inconclusive)
Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 15.38% which is insufficient. The required threshold is 80.00%. You can run @coderabbitai generate docstrings to improve docstring coverage.
Title check ❓ Inconclusive タイトル「feat: tests」は非常に曖昧で、プルリクエストの実際の変更内容を説明していません。 タイトルをより具体的に変更してください。例えば「feat: add feature flag resolution for info module」のように、実装した主要な機能を反映させてください。
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Linked Issues check ✅ Passed プルリクエストは情報表示機能の複数の問題を修正するための基盤を構築しており、リンク済みの問題#306の要件を満たしています。
Out of Scope Changes check ✅ Passed package.jsonのテストスクリプト変更とtsconfigへのNode型定義追加は、テスト基盤の整備に関連しており、リンク済み問題の範囲内です。
✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch tests

📜 Recent review details

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 156baf5 and 3ff16cf.

📒 Files selected for processing (3)
  • src/config-updater.ts (3 hunks)
  • test/config-updater.test.mjs (1 hunks)
  • tsconfig.json (1 hunks)
🧰 Additional context used
🧬 Code graph analysis (2)
test/config-updater.test.mjs (1)
src/config-updater.ts (2)
  • checkMissingConfigKeys (121-161)
  • performStartupConfigCheck (166-201)
src/config-updater.ts (1)
test/config-updater.test.mjs (9)
  • templatePath (36-36)
  • templatePath (79-79)
  • templatePath (160-160)
  • error (27-27)
  • userConfig (56-60)
  • userConfig (95-99)
  • userConfig (109-109)
  • configPath (138-138)
  • configPath (159-159)
🔇 Additional comments (15)
tsconfig.json (1)

22-22: Node型定義の追加は適切です。

新しいテストファイルで使用されるnode:assertnode:testnode:fs/promisesなどのNode.js組み込みモジュールの型サポートを有効にしています。

test/config-updater.test.mjs (9)

1-10: インポートは適切です。

node:プロトコルの使用とビルド済みモジュールからのインポートは、統合テストのアプローチとして正しく実装されています。


12-23: ロガーキャプチャヘルパーは機能的です。

テスト用のログキャプチャ実装は適切です。全ての引数を文字列に変換していますが、テストの目的には十分対応しています。


25-31: 終了動作のテストアプローチが優れています。

process.exitを実際に呼び出さずにテストできる実装は、テスタビリティの観点から適切な設計です。


33-74: 不足キー検出のテストが包括的です。

トップレベルとネストされたキーの両方を検証し、一時ディレクトリの適切なクリーンアップも実装されています。テストの設計は優れています。


76-104: 完全な設定のテストケースが適切です。

不足キーがない場合の正常系パスを検証しており、実装は適切です。


106-118: テンプレート欠落時のエラーハンドリングが適切です。

テンプレートが存在しない場合のエラー回復動作を検証しており、エッジケースのカバレッジは良好です。


120-133: 設定ファイル欠落時の終了動作が正しくテストされています。

終了コード1での終了を検証しており、実装は適切です。


135-154: 無効なTOMLの処理が適切にテストされています。

TOMLパースエラー時の終了動作を検証しており、エラーケースのカバレッジは良好です。


156-176: 成功時のテストが完全です。

設定の解析と返却を検証しており、エンドツーエンドのカバレッジは優れています。

src/config-updater.ts (5)

10-18: 型定義が適切に設計されています。

依存性注入のための型定義は、後方互換性を維持しながらテスタビリティを向上させる優れた設計です。Pickユーティリティ型の使用も適切です。


20-27: パス解決ヘルパーが適切に実装されています。

設定ファイルとテンプレートファイルのパス解決ロジックは明確で、適切なデフォルト値を提供しています。


29-44: テンプレート読み込み関数が正しくリファクタリングされています。

新しいオプションベースのパス解決を使用しており、エラーハンドリングも適切に維持されています。


121-161: 設定チェック関数のリファクタリングが優れています。

依存性注入を導入しながら後方互換性を維持し、全てのログ出力がロガー抽象化を通じて行われています。テスタビリティが大幅に向上しています。


166-201: 起動チェック関数の完全なリファクタリングが成功しています。

ロガーと終了関数の両方を抽象化し、テスト可能な設計に変更されています。デフォルト値による後方互換性も維持されており、実装は優れています。


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@gemini-code-assist
Copy link

Summary of Changes

Hello @lqvp, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request refactors the feature flag management within the info module by introducing a dedicated utility for resolving feature states, ensuring consistent behavior for both default-enabled and opt-in features. Concurrently, it updates the project's testing infrastructure to leverage Node.js's native test runner, accompanied by new tests for the feature flag resolution logic.

Highlights

  • Test Runner Update: The package.json file was updated to switch the test command from jest to pnpm -s build && node --test test/*.test.mjs, indicating a move to Node.js's native test runner.
  • Centralized Feature Flag Resolution: A new file, src/modules/info/feature-flags.ts, was added. It introduces a InfoFeatureFlags type and a resolveInfoFeatureFlags function to standardize how feature flags are determined, differentiating between features enabled by default and those requiring explicit opt-in.
  • Integration of New Feature Flag Logic: The src/modules/info/index.ts file was modified to import and utilize the resolveInfoFeatureFlags function, ensuring that feature states displayed in the info module are consistently resolved.
  • New Feature Flag Tests: A new test file, test/info-feature-flags.test.mjs, was added to thoroughly test the resolveInfoFeatureFlags function, verifying its behavior for various configuration scenarios.

🧠 New Feature in Public Preview: You can now enable Memory to help Gemini Code Assist learn from your team's feedback. This makes future code reviews more consistent and personalized to your project's style. Click here to enable Memory in your admin console.

Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

Copy link

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request refactors the feature flag logic into a new feature-flags.ts module and adds unit tests for it, which is a great improvement for maintainability and correctness. My review includes a few suggestions to further enhance the changes. I've recommended improving the new module's readability by extracting a type, fixing a minor performance issue where the new function is called redundantly, and expanding the new test suite to cover more cases. Overall, this is a solid contribution.

assert.equal(flags.emojiCheck, false);
assert.equal(flags.maze, false);
assert.equal(flags.poll, false);
});

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

These tests are a great start! To make the test suite more robust and cover all logic paths, I'd suggest adding a few more test cases:

  • Opt-in features when explicitly enabled (e.g., keywordEnabled: true).
  • Opt-in features when explicitly disabled (e.g., keywordEnabled: false).
  • Default-enabled features when explicitly enabled (e.g., chartEnabled: true).

Here's an example for one of the missing cases:

test('info: opt-in features are enabled when set to true', () => {
  const flags = resolveInfoFeatureFlags({
    keywordEnabled: true,
    reversiEnabled: true,
    serverMonitoring: true,
    checkEmojisEnabled: true,
    mazeEnable: true,
    pollEnable: true,
  });

  assert.equal(flags.keywordSearch, true);
  assert.equal(flags.reversi, true);
  assert.equal(flags.serverMonitoring, true);
  assert.equal(flags.emojiCheck, true);
  assert.equal(flags.maze, true);
  assert.equal(flags.poll, true);
});

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 0

🧹 Nitpick comments (1)
src/modules/info/index.ts (1)

291-318: 機能フラグの解決を最適化できます

resolveInfoFeatureFlags(config)formatBasicFeatures (292行目) と formatGameFeatures (321行目) の両方で呼び出されています。formatSafeConfigInfo で一度だけ解決し、両方の関数に渡すことで重複を削減できます。

🔎 リファクタリング案

formatSafeConfigInfo 内で一度だけ機能フラグを解決し、各フォーマット関数に渡すように変更:

-function formatBasicFeatures(): string {
-  const flags = resolveInfoFeatureFlags(config);
+function formatBasicFeatures(flags: InfoFeatureFlags): string {
   const lines: string[] = [
-function formatGameFeatures(): string {
-  const flags = resolveInfoFeatureFlags(config);
+function formatGameFeatures(flags: InfoFeatureFlags): string {
   const lines: string[] = [
 function formatSafeConfigInfo(): string {
+  const flags = resolveInfoFeatureFlags(config);
   let configInfo = `\n⚙️ **設定情報**\n`;
 
-  configInfo += formatBasicFeatures();
-  configInfo += formatGameFeatures();
+  configInfo += formatBasicFeatures(flags);
+  configInfo += formatGameFeatures(flags);
   configInfo += formatPostSettings();

型のインポートも追加:

-import { resolveInfoFeatureFlags } from './feature-flags.js';
+import { resolveInfoFeatureFlags, type InfoFeatureFlags } from './feature-flags.js';
📜 Review details

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between fa0d6c8 and 2735e70.

📒 Files selected for processing (4)
  • package.json (1 hunks)
  • src/modules/info/feature-flags.ts (1 hunks)
  • src/modules/info/index.ts (2 hunks)
  • test/info-feature-flags.test.mjs (1 hunks)
🧰 Additional context used
🧬 Code graph analysis (2)
src/modules/info/index.ts (3)
test/info-feature-flags.test.mjs (3)
  • flags (7-12)
  • flags (20-24)
  • flags (32-39)
src/modules/info/feature-flags.ts (1)
  • resolveInfoFeatureFlags (17-39)
src/config.ts (1)
  • config (110-110)
test/info-feature-flags.test.mjs (1)
src/modules/info/feature-flags.ts (1)
  • resolveInfoFeatureFlags (17-39)
🔇 Additional comments (6)
package.json (1)

12-12: テストランナーの変更を確認しました

Jestから Node.js 組み込みのテストランナーへの移行は適切です。ビルドステップの追加により、テスト実行前に TypeScript のコンパイルが保証されます。

src/modules/info/index.ts (1)

10-10: 機能フラグの統合が適切に実装されています

resolveInfoFeatureFlags のインポートと使用により、設定値の解釈が一元化され、issue #306 で報告された情報の不整合が修正されます。デフォルト有効な機能(autoWord、chart、timeSignal)と明示的なオプトイン機能の区別が明確になりました。

Also applies to: 292-332

test/info-feature-flags.test.mjs (1)

1-47: テストカバレッジが適切です

3つのテストケースで機能フラグの解決ロジックを包括的に検証しています:

  • デフォルト有効な機能(chart、autoWord、timeSignal)が未設定時に有効になること
  • デフォルト有効な機能が明示的に無効化できること
  • オプトイン機能(keywordSearch、reversi等)が未設定時に無効になること

テストは実装と完全に整合しており、issue #306 の修正を検証します。

src/modules/info/feature-flags.ts (3)

1-11: 型定義が明確です

InfoFeatureFlags 型は9つの機能フラグを非オプショナルな boolean として定義しており、型安全性を確保しています。基本機能とゲーム機能の両方を網羅しています。


13-15: ヘルパー関数の実装が適切です

isEnabledByDefaultUnlessFalse は、未定義の値をデフォルトで有効として扱う動作を正しく実装しています。レガシー設定との後方互換性を保ちながら、明示的な無効化も可能にします。


17-39: 機能フラグ解決ロジックが正確に実装されています

resolveInfoFeatureFlags 関数は、オプトイン機能とデフォルト有効な機能を正しく区別しています:

  • オプトイン機能(keywordSearch、reversi等): 明示的に true の場合のみ有効
  • デフォルト有効な機能(autoWord、chart、timeSignal): 明示的に false でない限り有効

この実装により、issue #306 で報告された機能情報の不整合が解消されます。

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 0

🧹 Nitpick comments (3)
src/config-updater.ts (2)

29-44: エラーメッセージでハードコードされたファイル名の使用

カスタムtemplatePathを指定した場合でも、エラーメッセージは常に example.config.toml を参照しています。実際のパスを使用することで、デバッグが容易になります。

🔎 提案される修正
 function loadConfigTemplate(options?: StartupConfigCheckOptions): Config {
   const templatePath = resolvePathFromOptions(options, 'template');

   if (!existsSync(templatePath)) {
     throw new Error(
-      'example.config.toml が見つかりません。テンプレートファイルが必要です。'
+      `${templatePath} が見つかりません。テンプレートファイルが必要です。`
     );
   }

   try {
     const templateData = readFileSync(templatePath, 'utf8');
     return TOML.parse(templateData) as Config;
   } catch (error) {
-    throw new Error(`example.config.toml の読み込みに失敗しました: ${error}`);
+    throw new Error(`${templatePath} の読み込みに失敗しました: ${error}`);
   }
 }

135-155: 冗長な条件チェック

Line 140 の if (missingKeys.length > 0) は、Line 135-138 で length === 0 の場合に既に return しているため、常に true になります。この条件は削除できます。

🔎 提案される修正
     if (missingKeys.length === 0) {
       logger.log('✅ 設定ファイルは完全です');
       return userConfig;
     }

-    if (missingKeys.length > 0) {
-      logger.log(
-        `\n📋 以下の設定項目が不足しています (${missingKeys.length}個):`
-      );
+    logger.log(
+      `\n📋 以下の設定項目が不足しています (${missingKeys.length}個):`
+    );
-      logger.log('━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━');
+    logger.log('━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━');

-      missingKeys.forEach((key) => {
-        const defaultValue = getNestedValue(template, key);
-        const valuePreview = formatValuePreview(defaultValue);
-        logger.log(`   📝 ${key} = ${valuePreview}`);
-      });
+    missingKeys.forEach((key) => {
+      const defaultValue = getNestedValue(template, key);
+      const valuePreview = formatValuePreview(defaultValue);
+      logger.log(`   📝 ${key} = ${valuePreview}`);
+    });

-      logger.log('━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━');
-      logger.log('💡 これらの設定を config.toml に追加することをお勧めします');
-      logger.log('📖 詳細は example.config.toml を参照してください');
-    }
+    logger.log('━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━');
+    logger.log('💡 これらの設定を config.toml に追加することをお勧めします');
+    logger.log('📖 詳細は example.config.toml を参照してください');
test/config-updater.test.mjs (1)

33-73: テストロジックは正しいですが、一時ディレクトリのクリーンアップを検討してください

テストケースは不足しているキー(top-level と nested)の検出を正しく検証しています。ただし、mkdtemp で作成された一時ディレクトリはテスト終了後にクリーンアップされません。CI環境でのディスク使用量を抑えるため、test.aftert.after でクリーンアップすることを検討してください。

🔎 クリーンアップの例
import { rm } from 'node:fs/promises';

test('checkMissingConfigKeys: reports missing keys', async (t) => {
  const dir = await mkdtemp(path.join(os.tmpdir(), 'ai-config-test-'));
  t.after(() => rm(dir, { recursive: true, force: true }));
  // ... rest of test
});
📜 Review details

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between eb8cfea and 156baf5.

📒 Files selected for processing (2)
  • src/config-updater.ts (3 hunks)
  • test/config-updater.test.mjs (1 hunks)
🧰 Additional context used
🧬 Code graph analysis (2)
test/config-updater.test.mjs (1)
src/config-updater.ts (2)
  • checkMissingConfigKeys (121-163)
  • performStartupConfigCheck (168-203)
src/config-updater.ts (1)
test/config-updater.test.mjs (9)
  • templatePath (35-35)
  • templatePath (77-77)
  • templatePath (156-156)
  • userConfig (55-59)
  • userConfig (93-97)
  • userConfig (107-107)
  • error (27-27)
  • configPath (135-135)
  • configPath (155-155)
🔇 Additional comments (6)
src/config-updater.ts (2)

10-27: LGTM! テスト可能な設計への良いリファクタリング

依存性注入パターンを使用して、consoleprocess.exitへの直接依存を排除しています。ConfigCheckLoggerStartupConfigCheckOptionsの型定義により、テスト時にモック可能な柔軟な設計になっています。


168-202: LGTM! テスト可能な起動チェック関数

performStartupConfigCheck は依存性注入を正しく活用しており、exit ハンドラーを注入可能にすることでテスト時に例外をスローするモックを使用できます。エラーハンドリングも適切に実装されています。

test/config-updater.test.mjs (4)

12-31: LGTM! テストヘルパー関数の良い設計

createCaptureLoggerexitThatThrows は依存性注入パターンをテストするための適切なヘルパーです。exitThatThrowscode プロパティ付きの例外をスローすることで、exit コードの検証が可能になっています。


75-102: LGTM!

設定が完全な場合の成功メッセージを正しく検証しています。


104-116: LGTM!

テンプレートファイルが見つからない場合のエラーハンドリングとグレースフルデグラデーション(userConfig を返す)を正しく検証しています。


118-172: LGTM! performStartupConfigCheck のテストカバレッジが良好

以下のシナリオが適切にテストされています:

  • config.toml が存在しない場合の exit(1)
  • 無効な TOML の場合の exit(1)
  • 成功時の設定オブジェクト返却

assert.throws のカスタム述語を使用してエラーコードを検証する手法も適切です。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

infoの情報が一部正しくない。

2 participants