react-native-navigation的迁移库

RNNModalManagerTest.m 587B

123456789101112131415161718192021222324
  1. #import <XCTest/XCTest.h>
  2. #import "RNNModalManager.m"
  3. @interface RNNModalManagerTest : XCTestCase
  4. @end
  5. @implementation RNNModalManagerTest
  6. - (void)testDismissAllModalsCleansPendingModalsToDismiss {
  7. RNNStore *store = [RNNStore new];
  8. [store.modalsToDismissArray addObject:@"modal_id_1"];
  9. [store.modalsToDismissArray addObject:@"modal_id_2"];
  10. [store.modalsToDismissArray addObject:@"modal_id_3"];
  11. RNNModalManager *modalManager = [[RNNModalManager alloc] initWithStore:store];
  12. [modalManager dismissAllModals];
  13. XCTAssertTrue([store.modalsToDismissArray count] == 0);
  14. }
  15. @end