cheminfo / cheminfo/nmrium

Improve e2e test readeability

Open
#2,621 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
TypeScript
Stars
80
Forks
34
Avg merge
2d 8h
Merged PRs (30d)
37

Description

Test test should be easy to read and requires a lot of helper methods in order to avoid duplicate code.

This is a quite readable test:

https://github.com/cheminfo/nmrium/blob/4f8660b06311855e50b7f5462d66744331fa710f/test-e2e/panels/integral.test.ts#L70-L90

The following test is not optimal. The following code:

https://github.com/cheminfo/nmrium/blob/4f8660b06311855e50b7f5462d66744331fa710f/test-e2e/core/import.test.ts#L95-L98

Could be written:

`await checNumberOfRangesInPanel(nmrium, 6)`

Helper functions should be often shared between testcase as well.

Contributor guide

No contributing guide indexed for this repository

Research direction

Start by comparing the readable example in test-e2e/panels/integral.test.ts and the target code in test-e2e/core/import.test.ts at the referenced lines. Identify helper functions that can be shared between test cases and improve the target test's readability without duplicating them. Done means the affected e2e tests are easier to read and repeated helper logic is shared.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
testing
Issue type
Refactor
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.