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

Issue 3689: Refactoring improving encapsulation #4249

Merged
merged 5 commits into from
Apr 24, 2020

Conversation

arvidOtt
Copy link
Contributor

@arvidOtt arvidOtt commented Apr 23, 2020

Requirements

  • Filling out the template is required. Any pull request that does not include enough information to be reviewed in a timely manner may be closed at the maintainers' discretion.
  • All new code requires tests to ensure against regressions.

Description of the Change

#3689 recommended to enhance encapsulation by introducing an instance method appendOnlyTest to the Suite class. This was already done and merged in #3707 .

Going a step further, the Test class should expose an instance method markOnly() which would do the call on its parent so this is not accessed directly by an other class.

Alternate Designs

Why should this be in core?

Benefits

The Test class handles calls on his own data resulting in a higher degree of abstraction and encapsulation.

Possible Drawbacks

Applicable issues

#3689

@jsf-clabot
Copy link

jsf-clabot commented Apr 23, 2020

CLA assistant check
All committers have signed the CLA.

@coveralls
Copy link

coveralls commented Apr 23, 2020

Coverage Status

Coverage increased (+0.07%) to 93.133% when pulling 88b24ef on arvidOtt:issue/3689 into 6838eaf on mochajs:master.

Copy link
Contributor

@boneskull boneskull left a comment

Choose a reason for hiding this comment

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

Looks great, thanks. Just one comment on the tests

test/unit/test.spec.js Show resolved Hide resolved
@boneskull boneskull merged commit 5f9400d into mochajs:master Apr 24, 2020
@boneskull boneskull added type: chore generally involving deps, tooling, configuration, etc. semver-patch implementation requires increase of "patch" version number; "bug fixes" labels Apr 24, 2020
@craigtaub craigtaub added this to the next milestone May 21, 2020
craigtaub pushed a commit that referenced this pull request May 21, 2020
* add markOnly instance method to test class

* add test cases for markOnly method

* use markOnly method of test class instead of accessing parent properties method

* refactor cases for test markOnly

* refactor test class unit test markOnly to exhaustively satisfy

Ref: #3689
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
semver-patch implementation requires increase of "patch" version number; "bug fixes" type: chore generally involving deps, tooling, configuration, etc.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants