digitransit-ui/test/unit/component/StopPageMap.test.js

21 lines
621 B
JavaScript

import { expect } from 'chai';
import { describe, it } from 'mocha';
import React from 'react';
import { shallowWithIntl } from '../helpers/mock-intl-enzyme';
import { Component as StopPageMap } from '../../../app/component/map/StopPageMap';
describe('<StopPageMap />', () => {
it('should render empty if stop information is missing', () => {
const props = {
breakpoint: 'large',
params: {
stopId: 'HSL:2211275',
},
routes: [],
stop: null,
};
const wrapper = shallowWithIntl(<StopPageMap {...props} />);
expect(wrapper.find('.map').length).to.equal(0);
});
});