react-native-navigation的迁移库

ScreenStore.test.js 377B

1234567891011121314151617181920
  1. describe('ScreenStore', () => {
  2. let uut;
  3. beforeEach(() => {
  4. uut = require('./ScreenStore');
  5. });
  6. class Component {
  7. //
  8. }
  9. class MyComponent extends Component {
  10. //
  11. }
  12. it('holds screens classes by screenKey', () => {
  13. uut.saveScreenClass('example.mykey', MyComponent);
  14. expect(uut.getScreenClass('example.mykey')).toEqual(MyComponent);
  15. });
  16. });