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

Adding coverall.io #4

Closed
wants to merge 35 commits into from
Closed

Adding coverall.io #4

wants to merge 35 commits into from

Conversation

zhujinxuan
Copy link
Owner

@zhujinxuan zhujinxuan commented Jun 13, 2018

Is this adding or improving a feature or fixing a bug?

feature

  1. add code coverage
  2. In configuring code coverage, I switch the test tool from mocha to jest. Because we need path alias to make slate-hyperscript use source files instead of lib files
  3. faster test; we do not need to run yarn build for tests
  4. faster linting CI. Becuase yarn $LINT_TYPE is run in parallel, I split the yarn lint with yarn lint:code and yarn lint:document then it can be run faster. And it is less confusing when contributors see an error by lint:document than just lint

What's the new behavior?

Sometimes we make careless mistakes just by forgetting to test, or decide to add tests later but forgot. (for example, PR ianstormtaylor#1864 is an example that a test is missing)

Code analysis can help us eliminate these problems, and suggests us which tests are perhaps missing. And new PR contributors can look at the code coverage difference by code.

How does this change work?

Add codeCov as code coverage service. The following is an example about which files/lines are tested and which are not yet tested. When submitting PR, we can check which newly added lines are not yet tested.

screen shot 2018-06-13 at 6 11 21 pm

screen shot 2018-06-13 at 6 18 28 pm

For example

Have you checked that...?

  • The new code matches the existing patterns and styles.
  • The tests pass with yarn test.
  • The linter passes with yarn lint. (Fix errors with yarn prettier.)
  • The relevant examples still work. (Run examples with yarn watch.)

Does this fix any issues or need any specific reviewers?

Fixes: #
Reviewers: @

@zhujinxuan zhujinxuan changed the title [On Development] Adding coverall.io WIP Adding coverall.io Jun 13, 2018
@codecov-io
Copy link

codecov-io commented Jun 13, 2018

Codecov Report

❗ No coverage uploaded for pull request base (master@73daa94). Click here to learn what that means.
The diff coverage is 95.46%.

Impacted file tree graph

@@            Coverage Diff            @@
##             master       #4   +/-   ##
=========================================
  Coverage          ?   67.47%           
=========================================
  Files             ?       69           
  Lines             ?     5058           
  Branches          ?     1307           
=========================================
  Hits              ?     3413           
  Misses            ?     1213           
  Partials          ?      432
Impacted Files Coverage Δ
packages/slate-react/src/constants/plugin-props.js 100% <ø> (ø)
...ckages/slate-react/src/utils/get-event-transfer.js 3.92% <0%> (ø)
packages/slate/src/models/mark.js 69.23% <0%> (ø)
packages/slate/src/models/value.js 58.92% <100%> (ø)
packages/slate-hyperscript/src/index.js 93.45% <100%> (ø)
packages/slate/src/models/range.js 79.45% <100%> (ø)
packages/slate/src/models/schema.js 91.66% <100%> (ø)
packages/slate/src/models/node.js 62.56% <100%> (ø)
packages/slate/src/models/leaf.js 80% <94.73%> (ø)
packages/slate/src/models/text.js 89.77% <94.79%> (ø)
... and 1 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 73daa94...0e0175d. Read the comment docs.

@zhujinxuan zhujinxuan changed the title WIP Adding coverall.io Adding coverall.io Jun 13, 2018
zhujinxuan and others added 12 commits June 14, 2018 18:08
…ylor#1869)

* Allow user to use immutable 4.0.0-rc without yarn warning

* Fix versions

* Fix immutable version to most recent

* Fix versions for react
* Fix issue with pasting in IE11

Fixing the issue where dataTransfer or clipboardData are not populated,
in IE 11 under event.NativeEvent. Instead, if we are using IE11, use
the base event object instead which contains a valid dataTrasnfer/clipboardData object.

* Run prettier on code changes
 - slate-base64-serializer@0.2.33
 - slate-html-serializer@0.6.5
 - slate-hyperscript@0.5.14
 - slate-plain-serializer@0.5.14
 - slate-prop-types@0.4.31
 - slate-react@0.12.8
 - slate-schema-violations@0.1.12
 - slate-simulator@0.4.31
 - slate@0.33.8
* initial simple decorations (mark-like), many tests added

* allow decorators to be set by focus, anchor tags - add tests

* handle one more edge case with decorations in hyperscript

* apply prettier cleanup

* apply linting rules

* update changelog

* ensure always normalize decoration ranges

* reapply prettier after latest adjustments

* all operations apply now update decorations with selection

* ranges can now be 'atomic', will invalidate if contents change

* lint, prettier cleanups

* add atomic invalidation tests, update hyperscript usage

* fix linter errors

* minor cleanup

* slight refactor for simplicity

* remove a couple superfluous lines

* update in response to review

* drop unnecessarily committed add'l file

* remove the need for explicit anchor, focus prop on decoration tags

* update hyperscript use to match latest syntax in ianstormtaylor#1777

* atomic -> isAtomic
* Preparing tests

* splitNode replacement

* Remove slow splice; replace mergeNode

* normalize Leaves

* Partially remove characters

* Partially remove characters

* styling

* Fix bugs; almost all characters are replaced

* Fixes almost existing tests; preparing adding tests for text

* Remove un-necessary check

* Empty leaf

* fix characters in getMarks

* Faster fromJSON

* Some corner cases for empty text

* Fix naive bug

* Supporting empty text with marks

* Supporting empty text with marks in hyperscript

* changes tests for marks in empty text

* Support splitNode marks with empty text

* Add tests for splitNode->insert

* Faster removeText

* Add warning ; remove getMarksAtIndex cache

* Remove characters in getInsertMarkAtRange

* Adding tests

* Change names of tests

* Update marks test

* Add a test confirm for invalid offsets:

* Add test for get active marks between offsets

* Fix document

* Add testing for insert-text

* Better remove text

* More sensible marks in empty text

* Allow marks of empty text after deleting partially marked text

* Add test for removing on partially marked text

* chnage test structure

* Add test for removeText

* Add test for removeText

* Avoid conflict between empty marked text and cursor

* Simple style fixes

* Simple style fixes

* Line break fixes

* Line break fixes

* Annotate the createLeaves

* Line breaks in test

* Line breaks fix

* add add-marks test

* add merge test

* Fix version update

* Remove empty_leaf optimization; optimize of that will be other PRs

* Clean up getMarksAtPosition

* Fix get-insert-marks-at-range

* clean up get-marks-at-position

* Fix spaces
@zhujinxuan zhujinxuan closed this Jun 15, 2018
@zhujinxuan
Copy link
Owner Author

Close this PR because it absorbs travis test from ian's main repo

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants