mirror of
https://github.com/zhigang1992/react-native-web.git
synced 2026-04-19 13:08:54 +08:00
This changes the return value of 'getApplication' so that the application element and stylesheets are all available as React elements. Also changes StyleSheet's 'renderToString' to 'getStyleSheets'. Fix #504
16 lines
406 B
JavaScript
16 lines
406 B
JavaScript
/* eslint-env jasmine, jest */
|
|
|
|
import { getApplication } from '../renderApplication';
|
|
import React from 'react';
|
|
|
|
const RootComponent = () => <div />;
|
|
|
|
describe('apis/AppRegistry/renderApplication', () => {
|
|
test('getApplication', () => {
|
|
const { element, stylesheets } = getApplication(RootComponent, {});
|
|
|
|
expect(element).toMatchSnapshot();
|
|
expect(stylesheets).toMatchSnapshot();
|
|
});
|
|
});
|