react-native-navigation的迁移库

SingleScreen.test.js 603B

123456789101112131415161718192021
  1. describe('single screen integration', () => {
  2. let Navigation;
  3. let mockNativeNavigation;
  4. beforeEach(() => {
  5. mockNativeNavigation = {};
  6. require('react-native').NativeModules.NativeNavigation = mockNativeNavigation;
  7. Navigation = require('../../src/index').default;
  8. });
  9. xit('startApp directs to native with constructed hirarchy for single screens', () => {
  10. mockNativeNavigation.startApp = jest.fn();
  11. Navigation.startApp({
  12. root: {
  13. key: 'com.integration.MyFirstScreen'
  14. }
  15. });
  16. expect(mockNativeNavigation.startApp).toHaveBeenCalledTimes(1);
  17. });
  18. });