Skip to content

Conversation

@Yusaku01
Copy link
Contributor

Description (required)

This PR's change is based on the following a file:

Related issues & labels (optional)

  • Closes #
  • Suggested label: i18n

I'd appreciate it if you could review this when you have time🫡

@github-actions github-actions bot added the i18n Anything to do with internationalization & translation efforts - ask @YanThomas for help! label Jan 25, 2026
@netlify
Copy link

netlify bot commented Jan 25, 2026

Deploy Preview for astro-docs-2 ready!

Built without sensitive environment variables

Name Link
🔨 Latest commit 66f5d5e
🔍 Latest deploy log https://app.netlify.com/projects/astro-docs-2/deploys/6976f83d47be06000862a5f3
😎 Deploy Preview https://deploy-preview-13140--astro-docs-2.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@astrobot-houston
Copy link
Contributor

astrobot-houston commented Jan 25, 2026

Lunaria Status Overview

🌕 This pull request will trigger status changes.

Learn more

By default, every PR changing files present in the Lunaria configuration's files property will be considered and trigger status changes accordingly.

You can change this by adding one of the keywords present in the ignoreKeywords property in your Lunaria configuration file in the PR's title (ignoring all files) or by including a tracker directive in the merged commit's description.

Tracked Files

File Note
ja/guides/testing.mdx Localization added, will be marked as complete.
Warnings reference
Icon Description
🔄️ The source for this localization has been updated since the creation of this pull request, make sure all changes in the source have been applied.

Copy link
Contributor

@morinokami morinokami left a comment

Choose a reason for hiding this comment

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

対応ありがとうございます!何点か自分が気になった箇所にコメントしました。すべてを自分の書いた通りに対応する必要もないので、妥当そうなものがあればピックアップして反映してみてください🙏

@@ -0,0 +1,411 @@
---
title: テスト
description: Astroにおけるテストの紹介
Copy link
Contributor

Choose a reason for hiding this comment

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

ちょっと細かいですが「紹介」よりは「入門」の方がこの場合は適切な気がしますね:

Suggested change
description: Astroにおけるテストの紹介
description: Astroにおけるテスト入門

Copy link
Contributor Author

Choose a reason for hiding this comment

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

よりストレートでシンプルにAstroでのテスト入門に変更しました。


テストは、動作するAstroコードを書き、メンテナンスするのに役立ちます。Astroは、Jest、Mocha、Jasmine、[Cypress](https://cypress.io)、[Playwright](https://playwright.dev)など、ユニットテスト、コンポーネントテスト、E2Eテストのための多くの人気ツールをサポートしています。また、React Testing Libraryのようなフレームワーク固有のテストライブラリをインストールして、UIフレームワークコンポーネントをテストすることもできます。

テストフレームワークを使うと、特定の状況においてコードがどのように動作すべきかについての**アサーション**や**エクスペクテーション**を記述し、それを実際のコードの動作と比較できます。
Copy link
Contributor

Choose a reason for hiding this comment

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

これも人それぞれ感ありますが、「アサーション」は割と日本語でも言ったり書いたりすると思うのですが、「エクスペクテーション」はあまり言わない気がしたので、「期待」や「期待値」などの方がいいかもしれません:

Suggested change
テストフレームワークを使うと、特定の状況においてコードがどのように動作すべきかについての**アサーション****エクスペクテーション**を記述し、それを実際のコードの動作と比較できます。
テストフレームワークを使うと、特定の状況においてコードがどのように動作すべきかについての**アサーション****期待値**を記述し、それを実際のコードの動作と比較できます。

Copy link
Contributor Author

Choose a reason for hiding this comment

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

ここは自分も迷ったですが、個人的に期待値が耳馴染みがあるので、
エクスペクテーション→期待値に変更させていただきました!


<p><Since v="4.9.0" /></p>

[container API](/ja/reference/container-reference/)を使用して、Astroコンポーネントをネイティブにテストできます。まず、[上記の説明に従って`vitest`](#vitest)をセットアップし、コンポーネントをテストするための`.test.js`ファイルを作成します:
Copy link
Contributor

Choose a reason for hiding this comment

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

文頭であるということと機能名であるということから「container API」の先頭は大文字の方が良さそうです:

Suggested change
[container API](/ja/reference/container-reference/)を使用して、Astroコンポーネントをネイティブにテストできます。まず、[上記の説明に従って`vitest`](#vitest)をセットアップし、コンポーネントをテストするための`.test.js`ファイルを作成します:
[Container API](/ja/reference/container-reference/)を使用して、Astroコンポーネントをネイティブにテストできます。まず、[上記の説明に従って`vitest`](#vitest)をセットアップし、コンポーネントをテストするための`.test.js`ファイルを作成します:

Copy link
Contributor Author

Choose a reason for hiding this comment

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

対応させていただきました!


#### Cypressテストを実行する

Cypressはコマンドラインまたはcypressアプリから実行できます。アプリはテストの実行とデバッグのためのビジュアルインターフェースを提供します。
Copy link
Contributor

Choose a reason for hiding this comment

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

こちらも大文字の方が良さそうです:

Suggested change
Cypressはコマンドラインまたはcypressアプリから実行できます。アプリはテストの実行とデバッグのためのビジュアルインターフェースを提供します。
CypressはコマンドラインまたはCypressアプリから実行できます。アプリはテストの実行とデバッグのためのビジュアルインターフェースを提供します。

Copy link
Contributor Author

Choose a reason for hiding this comment

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

対応させていただきました!


Cypressはコマンドラインまたはcypressアプリから実行できます。アプリはテストの実行とデバッグのためのビジュアルインターフェースを提供します。

まず、Cypressがライブサイトにアクセスできるように開発サーバーを起動します。
Copy link
Contributor

Choose a reason for hiding this comment

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

「ライブサイト」はあまり日本語として聞き馴染みがない気がしたため、「動作中のサイト」などのように変えてもいいかもしれません:

Suggested change
まず、Cypressがライブサイトにアクセスできるように開発サーバーを起動します
まず、Cypressが動作中のサイトにアクセスできるように開発サーバーを起動します

Copy link
Contributor Author

Choose a reason for hiding this comment

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

対応させていただきました!


Cypressアプリが起動したら、**E2E Testing**を選択し、テストの実行に使用するブラウザを選択します。

テストの実行が完了すると、テストが成功したことを確認する緑色のチェックマークが出力に表示されます:
Copy link
Contributor

Choose a reason for hiding this comment

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

これはかなり細かいのですが「出力に表示され」だと同じことを言っているように見えるため、単に「出力されます」とかでよさそうです:

Suggested change
テストの実行が完了すると、テストが成功したことを確認する緑色のチェックマークが出力に表示されます:
テストの実行が完了すると、テストが成功したことを確認する緑色のチェックマークが出力されます:

Copy link
Contributor Author

Choose a reason for hiding this comment

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

対応させていただきました!

@Yusaku01
Copy link
Contributor Author

@morinokami

レビューいただきありがとうございます!大変助かります🙏
合間見て修正対応させていただきます!🫡

Copy link
Contributor

@morinokami morinokami left a comment

Choose a reason for hiding this comment

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

LGTM!

@morinokami morinokami merged commit 0a65918 into withastro:main Jan 26, 2026
11 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

i18n Anything to do with internationalization & translation efforts - ask @YanThomas for help!

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants