react-native-popup-menu/__tests__/HelloComponent-test.js

21 lines
550 B
JavaScript
Raw Normal View History

2016-05-17 10:52:47 +00:00
import React from 'react';
import { View } from 'react-native';
import utils from 'react-addons-test-utils';
jest.dontMock('./HelloComponent');
const HelloComponent = require('./HelloComponent').default;
describe('HelloComponent', () => {
it('should render hello world', () => {
const renderer = utils.createRenderer();
renderer.render(
<HelloComponent />
);
const output = renderer.getRenderOutput();
expect(output.type).toEqual(View);
expect(output.props.children.props.children).toBe("Hello world!");
});
});