Improve unit tests in discountsParser_test.go
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 88/100
- Issue type
- Refactor
- Clarity
- Clearly specified
- Activity status
- Active
- Tech stack
- go
- Domain
- testing-qa
Research direction
Open discountsParser_test.go and inspect TestParseDiscountItem, TestIsValidDiscount, TestCleanText, TestExtractEmail, and TestTrimAfter. Compare their table-driven structure with parser/requisiteParser_test.go, then run the relevant Go tests. Done means each named test uses a slice with the former key represented by a Name field and all tests still pass.
Written by the indexing model from the issue text.
Description
TestParseDiscountItem, TestIsValidDiscount, TestCleanText, TestExtractEmail, and TestTrimAfter use the following format for table driven tests:
testCases := map[string]struct {
html string
category string
expected schema.DiscountProgram
}{
"complete_entry": { ... }
Change them to represent their table as a slice (move key into a field Name).
A good example can be found [here](https://github.com/UTDNebula/api-tools/blob/develop/parser/requisiteParser_test.go)
Resources
- Dominant language
- Go
- Stars
- 12
- Forks
- 54
- Avg merge
- 2m
- Merged PRs (30d)
- 1
Getting set up
- Ships a Dockerfile or Docker Compose file
- No pull request template
- No contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from UTDNebula/api-tools
-
Improve unit tests in sectionParser_test.goPossibly taken @Sidd-Pelluru claimed this 14 days ago. OpenL1 recommended for recruits
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
-
L1 recommended for recruits
Difficulty 2/5 1-3 hours Newbie friendliness 85/100
-
L1 Type: Bug Report
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
-
Improve output in events.goPossibly taken @DennisOrtin claimed this 5 days ago. OpenL1 recommended for recruits
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
-
L2 Type: Internal
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
All issues in UTDNebula/api-tools
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 62/100
siyuan-note/siyuan#20353 ·
Maintainers usually reply within 1 day
-
attributes-natural-language "en-US" is rejected by PAPPL >= 1.4.12 printers (RFC 8011 requires lowercase)Possibly taken @ChrisEdgington claimed this today. Open
Difficulty 1/5 Under an hour Newbie friendliness 84/100
OpenPrinting/ipp-usb#140 ·
-
Discriminator mapping keys are listed in a random orderPossibly taken @reuvenharrison claimed this today. Open
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
Maintainers usually reply within 1 day
-
Idle compaction monitors LIST the replica every tick when the newest destination file spans more than one TXIDPossibly taken @pishuv claimed this today. Open
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
benbjohnson/litestream#1563 ·
Maintainers usually reply within 2 days
-
triage needed
Difficulty 1/5 1-3 hours Newbie friendliness 78/100
Maintainers usually reply within 2 days