Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Vuexのコマンドのsnapshotテストを追加 #2175

Merged
merged 12 commits into from
Jul 24, 2024

Conversation

Hiroshiba
Copy link
Member

内容

Vuexでも結構簡単にテストが書けることがわかったので、実際に書いてみました。
適当なコマンドを1つ実行して、vuexのstateが思っている形になっているかをスナップショットテストします。

UUIDの固定のために

が先に必要です。

関連 Issue

#2174

その他

もうちょっと整備できるかもだけど、まあこれでもいいかなと思ってます。

@Hiroshiba Hiroshiba requested a review from a team as a code owner July 20, 2024 15:10
src/helpers/random.ts Outdated Show resolved Hide resolved
src/helpers/random.ts Show resolved Hide resolved
src/store/project.ts Outdated Show resolved Hide resolved
Copy link
Member

@sevenc-nanashi sevenc-nanashi left a comment

Choose a reason for hiding this comment

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

LGTMです。

eslintあたりでcrypto.randomUUID縛りたいですね…

@Hiroshiba
Copy link
Member Author

レビューありがとうございます!!

eslintあたりでcrypto.randomUUID縛りたいですね…

ま~テストで使わないならとっても良いかもとちょっとだけ思いました。
縛った方がいい気もしますが・・・!

@Hiroshiba Hiroshiba merged commit bb42a89 into VOICEVOX:main Jul 24, 2024
9 checks passed
@Hiroshiba Hiroshiba deleted the Vuexのテストを書いてみる branch July 24, 2024 17:51
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.

2 participants