mirror of
https://github.com/HSLdevcom/digitransit-ui
synced 2025-07-05 16:30:37 +02:00
27 lines
800 B
JavaScript
27 lines
800 B
JavaScript
import { expect } from 'chai';
|
|
import { describe, it } from 'mocha';
|
|
import React from 'react';
|
|
import { Settings } from 'luxon';
|
|
|
|
import { mockContext } from '../helpers/mock-context';
|
|
import { shallowWithIntl } from '../helpers/mock-intl-enzyme';
|
|
import { Component as LangSelect } from '../../../app/component/LangSelect';
|
|
|
|
describe('LangSelect', () => {
|
|
after(() => {
|
|
Settings.defaultLocale = 'en';
|
|
});
|
|
|
|
describe('<LangSelect />', () => {
|
|
it('should render', () => {
|
|
const wrapper = shallowWithIntl(<LangSelect currentLanguage="en" />, {
|
|
context: {
|
|
...mockContext,
|
|
executeAction: () => true,
|
|
config: { availableLanguages: ['fi', 'sv', 'en'] },
|
|
},
|
|
});
|
|
expect(wrapper.isEmptyRender()).to.equal(false);
|
|
});
|
|
});
|
|
});
|