mirror of
https://github.com/facebook/react.git
synced 2025-11-01 09:12:30 +00:00
* Unify the way we fork modules * Replace rollup-plugin-alias with our own plugin This does exactly what we need and doesn't suffer from https://github.com/rollup/rollup-plugin-alias/issues/34. * Move the new plugin to its own file * Rename variable for consistency I settled on calling them "forks" since we already have a different concept of "shims". * Move fork config into its own file
35 lines
818 B
JavaScript
35 lines
818 B
JavaScript
/**
|
|
* Copyright (c) 2013-present, Facebook, Inc.
|
|
*
|
|
* This source code is licensed under the MIT license found in the
|
|
* LICENSE file in the root directory of this source tree.
|
|
*
|
|
* @emails react-core
|
|
*/
|
|
|
|
'use strict';
|
|
|
|
var React;
|
|
var ReactNativeCS;
|
|
|
|
jest.mock('shared/ReactFeatureFlags', () =>
|
|
require('shared/forks/ReactFeatureFlags.native-cs'),
|
|
);
|
|
|
|
describe('ReactNativeCS', () => {
|
|
beforeEach(() => {
|
|
jest.resetModules();
|
|
|
|
React = require('react');
|
|
ReactNativeCS = require('react-cs-renderer');
|
|
});
|
|
|
|
it('should be able to create and render a native component', () => {
|
|
const CSView = 'View';
|
|
var props = <CSView foo="test" />;
|
|
var state = ReactNativeCS.getInitialState({});
|
|
var stateUpdater = function() {};
|
|
ReactNativeCS.render({props, state, stateUpdater});
|
|
});
|
|
});
|