Skip to content
This repository has been archived by the owner on Dec 31, 2024. It is now read-only.

Inherit formatter #269

Merged
merged 3 commits into from
Jan 7, 2018
Merged

Inherit formatter #269

merged 3 commits into from
Jan 7, 2018

Conversation

podkot
Copy link
Contributor

@podkot podkot commented Jan 6, 2018

Hi.

When using component based localization, you have to import custom formatter to all the components. This patch allows components to inherit root's formatter.

Live example: https://jsfiddle.net/xocaao6o/1/
Both lines should be 'custom formatted'

One test is failing in the branch on my local setup:

SUMMARY:
✔ 158 tests completed
✖ 1 test failed

FAILED TESTS:
  datetime format
    getDateTimeFormat / setDateTimeFormat
      ✖ should be worked
        HeadlessChrome 0.0.0 (Mac OS X 10.13.2)
      AssertionError:   # test/unit/datetime.test.js:50

        assert.equal(text.textContent, '2012/12/20 下午12:00')
                     |    |
                     |    "2012/12/20 上午7:00"
                     HTMLParagraphElement{__vue__:#Vue$3#}

but it looks not related to the diff.

@codecov-io
Copy link

codecov-io commented Jan 6, 2018

Codecov Report

Merging #269 into dev will increase coverage by <.01%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##              dev     #269      +/-   ##
==========================================
+ Coverage   96.09%   96.09%   +<.01%     
==========================================
  Files           9        9              
  Lines         614      615       +1     
==========================================
+ Hits          590      591       +1     
  Misses         24       24
Impacted Files Coverage Δ
src/mixin.js 96.55% <100%> (+0.06%) ⬆️

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 c5189f9...357b403. Read the comment docs.

Copy link
Owner

@kazupon kazupon left a comment

Choose a reason for hiding this comment

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

Thank you for your PR! 😺

Coud you add the unit tests please?

@podkot
Copy link
Contributor Author

podkot commented Jan 6, 2018

Unit test added, review please

@kazupon kazupon merged commit 26a33ad into kazupon:dev Jan 7, 2018
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.

3 participants