ember.js - How do enable the format.js helpers in Ember Unit tests -
i using ember formatjs internationalize application, , ember-cli build all.
when generate component with
ember g component some-component
ember creates test checks component renders. however, if use intl-get helper formatjs in component template, unit test fails.
so how can register custom helpers formatjs creates unit test?
i first tried add intl-get helper:
moduleforcomponent('some-component', { needs: ['helper:intl-get'] });
however, fails inside intl-get when tries access "intl:main". intl initializer run, not sure if there application setup. or way mock methods using sinon?
my current workaround delete 'it renders' tests. these tests pass well, can further test rendering later if want.
try:
moduleforcomponent('some-component', { integration: true });
Comments
Post a Comment