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

[OFA] ビューのサマリを表示する #157

Merged
merged 14 commits into from
Jul 4, 2024
Merged

Conversation

Ryo-Kgym
Copy link
Owner

@Ryo-Kgym Ryo-Kgym commented Jun 3, 2024

No description provided.

{ name: "Group F", value: 189 },
];
export const ShowChartServer = async ({ appId }: { appId: string }) => {
// レコードデータの呼び出しは RecordListServer を参照
Copy link
Owner Author

Choose a reason for hiding this comment

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

ここのコメントはもう不要になったので削除でー

Comment on lines +9 to +10
records: Records;
criteria: SummaryCriteria;
Copy link
Owner Author

Choose a reason for hiding this comment

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

対応不要な備忘録

複数の引数がある時
a: string, b: stringだと

引数を渡す時に、間違えることがあるので、オブジェクトに包むようにしています

今回の場合は、それぞれ型がしっかりとあるので
オブジェクトで包むのは必須ではないです

it("", () => {
const criteria: SummaryCriteria = {
groupingFields: {
"1718289203212": {
Copy link
Owner Author

Choose a reason for hiding this comment

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

suggestion

テストデータで使用する値は、実データと遠いものかつそれ自体がわかりやすいものがいいですね。

ここで重要なのは、文字・数字が他のどの部分で使用されているかがパッとわかることです
そうすることで、単体テストの可読性が一気に上がります。

他にサンプルがいくつもあるので真似てみてください

describe("sumRecords", () => {
it("", () => {
const records: Records = {
r1: {
Copy link
Owner Author

Choose a reason for hiding this comment

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

上記の指摘
この辺参考になりそう

Ryo-Kgym and others added 12 commits July 4, 2024 23:14
@Ryo-Kgym Ryo-Kgym merged commit 1a9f2ad into develop Jul 4, 2024
5 checks passed
@Ryo-Kgym Ryo-Kgym deleted the One-for-All-156 branch July 4, 2024 14:35
@Ryo-Kgym Ryo-Kgym linked an issue Jul 8, 2024 that may be closed by this pull request
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.

[OFA] ビューのサマリを表示する
2 participants