Skip to content
This repository has been archived by the owner on Jul 29, 2019. It is now read-only.

Refactoring and unit testing of Validator module #3106

Merged
merged 11 commits into from
Jul 20, 2017

Conversation

wimrijnders
Copy link
Contributor

@wimrijnders wimrijnders commented May 26, 2017

Changes in this PR:

  • Did some obvious refactorings in Validator.js, some comment cleanup
  • Added a unit test to test these refactorings
  • Added module test-console to package.json to aid the unit tests

The refactoring was mainly done to aid better understanding of the code. In addition, I will note here that this 'better understanding' is required to add some new features in the near future to Validator, namely:

  • Allow explicitly setting undefined for options (required in graph3d) Edit: This works already, it's a matter of correctly defining value undefined for a given field.
  • Add the possibility of marking an option deprecated.

The unit test has been constructed in a manner that it tests all possible paths affected by the refactoring. Hence, the unit test is not complete; there is room for adding more tests here.

@wimrijnders
Copy link
Contributor Author

Added extra unit test for explicit undefined values, to be absolutely sure it will always work as expected.

wimrijnders added a commit to wimrijnders/vis that referenced this pull request Jun 12, 2017
Fix for almende#3106

Event `stabilizationProgress` is now always sent for iteration 0 and for the very last stabilization iteration.
yotamberk pushed a commit that referenced this pull request Jun 13, 2017
Fix for #3106

Event `stabilizationProgress` is now always sent for iteration 0 and for the very last stabilization iteration.
@yotamberk yotamberk merged commit 9795e90 into almende:develop Jul 20, 2017
@wimrijnders wimrijnders deleted the refactorValidator branch July 21, 2017 04:21
primozs pushed a commit to primozs/vis that referenced this pull request Jan 3, 2019
…e#3165)

Fix for almende#3106

Event `stabilizationProgress` is now always sent for iteration 0 and for the very last stabilization iteration.
primozs pushed a commit to primozs/vis that referenced this pull request Jan 3, 2019
* Added unit test for Validator, minimum viable version.

* Added test-console to package list

* Completed minimum viable unit test for Validator

* Added Validator unit test for explicit 'undefined'
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants