Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

Improve unit tests in sectionParser_test.go

オープン 初心者向け
#202 コメント 1 件 リアクション 0 件 担当者 1 名 GitHub で見る

@Sidd-Pelluru がすでに取り組んでいます。

2026年9月25日 から。

評価

難易度
2/5
見積もり時間
1〜3時間
初心者へのやさしさ
88/100
issue の種類
リファクタリング
明瞭さ
明確に書かれている
活発さ
活発
技術スタック
go
領域
testing

調査の方向性

sectionParser_test.go の TestGetInternalClassAndCourseNum、TestGetAcademicSession、TestGetSectionNumber、TestParseTimeOrPanic から始め、その後 requisiteParser_test.go のテーブル駆動スタイルと比較します。ケースを名前付きの slice エントリに変換し、テスト名を説明的なものにします。関連する Go テストを実行して、決定的な実行と正常な動作を確認します。

索引モデルが issue の本文から書いたものです。

説明

L1 recommended for recruits

TestGetInternalClassAndCourseNum, TestGetAcademicSession, TestGetSectionNumber TestParseTimeOrPanic use the following format (or similar) for table driven tests:

fails := []map[string]string{
		{
			"Class Section:": "ENTP33S",
		},
		{
			"Class Section:": "",
		},
		{
			"Class Section:": "Garbage In, Garbage out",
		},
	}

Change it to be a slice by moving the key into a field (i.e. Name). This is better practice as it ensures a deterministic test order.

Change test names to be more descriptive.

A good example can be found [here](https://github.com/UTDNebula/api-tools/blob/develop/parser/requisiteParser_test.go)

Resources

https://pkg.go.dev/testing

主要言語
Go
スター
12
フォーク
54
平均マージ
2分
マージ済み PR(30日)
1

環境構築

  • Dockerfile または Docker Compose ファイルあり
  • プルリクエストのテンプレートなし
  • コントリビューションガイドなし

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

UTDNebula/api-tools のほかの issue

UTDNebula/api-tools の issue をすべて見る

似ている issue

Go の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。