mirror of
https://github.com/scratchfoundation/scratch-www.git
synced 2024-12-18 11:32:29 -05:00
b89fe1a985
Adds a prop to the Page component so each page can say whether or not it wants them to appear.
21 lines
623 B
JavaScript
21 lines
623 B
JavaScript
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);
|
|
});
|
|
});
|