Skip to content

Commit

Permalink
WPS-14 fix(test): use demo app test configuration to provide languages
Browse files Browse the repository at this point in the history
  • Loading branch information
Xesenix committed Mar 4, 2018
1 parent 361f178 commit 3dc3065
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ before_install:
- export DISPLAY=:99.0
- sh -e /etc/init.d/xvfb start
script:
- npm run test
- npm run demo:test
- npm run demo:build:prod
after_success:
- npm run report-coverage
Expand Down
2 changes: 1 addition & 1 deletion appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ test_script:
- node --version
- npm --version
# run tests
- npm test
- npm run demo:test

build_script:
# run production build
Expand Down
2 changes: 1 addition & 1 deletion src/app/component/language-switch.spec.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ describe('LanguageSwitch', () => {

describe('onChange', () => {
it('should call callback', () => {
spyOn(i18n, 'setLocale');
spyOn(i18n, 'setLocale').and.callThrough();
const spy = jasmine.createSpy('spy');
const component = mount(<LanguageSwitch onChange={spy}/>);
const selectTag = component.find(`select`);
Expand Down
2 changes: 1 addition & 1 deletion src/lib/localize.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ languages.forEach((locale: string) => {
console.warn(`Missing locales: ${locale}`);
}
});

console.log('default language:', languages[0], languages);
i18n.setLocale(languages[0]);

export const __ = i18n.gettext.bind(i18n);

0 comments on commit 3dc3065

Please sign in to comment.