diff options
author | Georg Schölly <git@gsch.ch> | 2016-06-25 12:59:00 +0200 |
---|---|---|
committer | Aarni Koskela <akx@iki.fi> | 2016-11-19 16:06:16 +0200 |
commit | fd351472cfbefaa5fd31331d277855b436f82ca6 (patch) | |
tree | 24045f2b16d3256e316dc8293249064126054ac7 | |
parent | f8b62e5d74a11d572ffb8898d17f72ed09048583 (diff) | |
download | babel-fd351472cfbefaa5fd31331d277855b436f82ca6.tar.gz |
Increase coverage of JSX extraction tests
b5e0ad8 fixed a few bugs with jsx parsing but only added
tests for the lexer. This commit adds a test for the extraction
which did not work before:
<tag>{ _"Text" }</tag>
This test case is not present yet in the suite, only tags with
attributes (<tag attr="value">) are, but they get extracted correctly
already.
-rw-r--r-- | tests/messages/test_js_extract.py | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/tests/messages/test_js_extract.py b/tests/messages/test_js_extract.py index 35322ea..d19c255 100644 --- a/tests/messages/test_js_extract.py +++ b/tests/messages/test_js_extract.py @@ -108,10 +108,12 @@ class Foo { <option value="val1">{ i18n._('String1') }</option> <option value="val2">{ i18n._('String 2') }</option> <option value="val3">{ i18n._('String 3') }</option> + <option value="val4">{ _('String 4') }</option> + <option>{ _('String 5') }</option> ); } """ -EXPECTED_JSX_MESSAGES = ["hello", "String1", "String 2", "String 3"] +EXPECTED_JSX_MESSAGES = ["hello", "String1", "String 2", "String 3", "String 4", "String 5"] @pytest.mark.parametrize("jsx_enabled", (False, True)) |