Skip to content

Commit

Permalink
failing test with fragment
Browse files Browse the repository at this point in the history
  • Loading branch information
jordonbiondo committed Jul 26, 2019
1 parent 6015a96 commit 4b3e6e7
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 4 deletions.
11 changes: 8 additions & 3 deletions test/extract.js
Original file line number Diff line number Diff line change
Expand Up @@ -398,10 +398,15 @@ describe('Extract', function () {
];
var catalog = testExtract(files);

assert.equal(catalog.items.length, 1);
assert.equal(catalog.items[0].msgid, 'Hi from an ES6 class!');
assert.equal(catalog.items.length, 2);

assert.equal(catalog.items[1].msgid, 'Hi from an ES6 class!');
assert.equal(catalog.items[1].msgstr, '');
assert.deepEqual(catalog.items[1].references, ['test/fixtures/es6-class.js:5']);

assert.equal(catalog.items[0].msgid, 'Hi from a fragment!');
assert.equal(catalog.items[0].msgstr, '');
assert.deepEqual(catalog.items[0].references, ['test/fixtures/es6-class.js:5']);
assert.deepEqual(catalog.items[0].references, ['test/fixtures/es6-class.js:12']);
});

it('Should extract custom attributes from HTML', function () {
Expand Down
8 changes: 7 additions & 1 deletion test/fixtures/es6-class.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,13 @@ class TestController {

this.bindedMethod = ::this.method;

const component = <Component attr={true} />;
const component = (
<Component attr={true}>
<>
{gettext("Hi from a fragment!")};
</>
</Component>
);

const a = { a: 1 };
const b = { b: 2 };
Expand Down

0 comments on commit 4b3e6e7

Please sign in to comment.