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

[fix #285] - Add namespace to compile #295

Merged
merged 3 commits into from
Aug 29, 2018

Conversation

dephiros
Copy link
Contributor

@dephiros dephiros commented Aug 27, 2018

Closes #285

@codecov
Copy link

codecov bot commented Aug 27, 2018

Codecov Report

Merging #295 into master will increase coverage by 0.08%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #295      +/-   ##
==========================================
+ Coverage   91.58%   91.66%   +0.08%     
==========================================
  Files          42       42              
  Lines        1069     1080      +11     
==========================================
+ Hits          979      990      +11     
  Misses         90       90
Impacted Files Coverage Δ
packages/cli/src/mocks.js 100% <ø> (ø) ⬆️
packages/cli/src/api/compile.js 100% <100%> (ø) ⬆️
packages/conf/src/index.js 96.42% <100%> (ø) ⬆️

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 604836c...44252c7. Read the comment docs.

Copy link
Contributor

@tricoder42 tricoder42 left a comment

Choose a reason for hiding this comment

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

This is really good! Unit tests might be as simple as snapshot testing. Feel free to test just createCompiledCatalog and the simplest message catalog only. Something like:

const actual = createCompiledCatalog("en", {}, false, "cjs")
expect(actual).toMatchSnapshot()

@dephiros dephiros force-pushed the fix/285-specify-namespace-cli branch 7 times, most recently from d0e63b8 to b417ccf Compare August 29, 2018 15:08
@dephiros dephiros changed the title [WIP] - fix #285 - Add namespace to compile [fix #285] - Add namespace to compile Aug 29, 2018
…ow user to specify the namespace of compiled js file: ex: export default or module.export or window.translations
@dephiros dephiros force-pushed the fix/285-specify-namespace-cli branch from b417ccf to bdeaf1c Compare August 29, 2018 16:48
@dephiros dephiros force-pushed the fix/285-specify-namespace-cli branch from bdeaf1c to c469281 Compare August 29, 2018 16:52
@tricoder42 tricoder42 merged commit a3c5bd1 into lingui:master Aug 29, 2018
@dephiros dephiros deleted the fix/285-specify-namespace-cli branch August 29, 2018 18:52
Photonios pushed a commit to SectorLabs/js-lingui that referenced this pull request Dec 9, 2019
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.

2 participants