scratch-www/test/unit/components/page.test.jsx

22 lines
623 B
React
Raw Normal View History

const React = require('react');
const {shallowWithIntl} = require('../../helpers/intl-helpers.jsx');
const Page = require('../../../src/components/page/www/page.jsx');
describe('Page', () => {
test('Do not show donor recognition', () => {
const component = shallowWithIntl(
<Page />
);
expect(component.find('#donor')).toHaveLength(0);
});
test('Show donor recognition', () => {
const component = shallowWithIntl(
<Page
showDonorRecognition
/>
);
expect(component.find('#donor')).toHaveLength(1);
});
});