react-native-navigation的迁移库

Navigation.test.js 666B

12345678910111213141516171819202122232425262728
  1. import _ from 'lodash';
  2. describe('Navigation', () => {
  3. let Navigation;
  4. beforeEach(() => {
  5. Navigation = require('./Navigation');
  6. });
  7. it('exposes static commands', () => {
  8. _.forEach([
  9. Navigation.registerContainer,
  10. Navigation.startApp,
  11. Navigation.push,
  12. Navigation.pop,
  13. Navigation.popToRoot,
  14. Navigation.newStack,
  15. Navigation.showModal,
  16. Navigation.dismissModal,
  17. Navigation.dismissAllModals,
  18. Navigation.showLightbox,
  19. Navigation.dismissLightbox,
  20. Navigation.showInAppNotification,
  21. Navigation.dismissInAppNotification
  22. ], (f) => expect(f).toBeInstanceOf(Function));
  23. });
  24. });