mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
Summary: ## Changelog <!-- Help reviewers and the release process by writing your own changelog entry. For an example, see: https://github.com/facebook/react-native/wiki/Changelog --> This PR aims to migrate the RNTester App to `packages` directory. But is currently, open to inspect the CI issues and resolve the merge conflicts. Currently done - Working on iOS - Working on Android - Detox Tests working on iOS Need to work on - Errors generated by the CI builds [General] [Changed] - Migrated the RNTester App to the packages directory. Pull Request resolved: https://github.com/facebook/react-native/pull/29567 Test Plan: It runs on both ios and android for now and the detox iOS builds are working. Reviewed By: cpojer Differential Revision: D23034761 Pulled By: rickhanlonii fbshipit-source-id: e04bb06e1c7ef15d340206090d1575a871b9e6f5
40 lines
1.8 KiB
Objective-C
40 lines
1.8 KiB
Objective-C
/*
|
|
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
*
|
|
* This source code is licensed under the MIT license found in the
|
|
* LICENSE file in the root directory of this source tree.
|
|
*/
|
|
|
|
#import <XCTest/XCTest.h>
|
|
|
|
#import <React/RCTAssert.h>
|
|
|
|
@interface RCTFormatErrorTests : XCTestCase
|
|
|
|
@end
|
|
|
|
@implementation RCTFormatErrorTests
|
|
|
|
- (void)testSymbolication {
|
|
NSArray<NSDictionary<NSString *, id> *> *stackTrace = @[
|
|
@{@"methodName": @"method_from_bundle", @"column": @11, @"lineNumber": @7, @"file": @"Fb4aBundle.js"},
|
|
@{@"methodName": @"method_from_ram_bundle", @"column": @13, @"lineNumber": @18, @"file": @"199.js"},
|
|
@{@"methodName": @"method_from_ram_bundle_with_address", @"column": @13, @"lineNumber": @18, @"file": @"address at 199.js"},
|
|
@{@"methodName": @"method_from_segment", @"column": @18, @"lineNumber": @9, @"file": @"seg-1.js"},
|
|
@{@"methodName": @"method_from_segment_with_address", @"column": @18, @"lineNumber": @9, @"file": @"address at seg-1.js"},
|
|
@{@"methodName": @"method_from_ram_segment", @"column": @20, @"lineNumber": @10, @"file": @"seg-3_198.js"},
|
|
@{@"methodName": @"method_from_ram_segment_with_address", @"column": @20, @"lineNumber": @10, @"file": @"address at seg-3_198.js"}
|
|
];
|
|
NSString *message = RCTFormatError(@"Error", stackTrace, 0);
|
|
XCTAssertEqualObjects(message, @"Error, stack:\n"
|
|
"method_from_bundle@7:11\n"
|
|
"method_from_ram_bundle@199.js:18:13\n"
|
|
"method_from_ram_bundle_with_address@199.js:18:13\n"
|
|
"method_from_segment@seg-1.js:9:18\n"
|
|
"method_from_segment_with_address@seg-1.js:9:18\n"
|
|
"method_from_ram_segment@seg-3_198.js:10:20\n"
|
|
"method_from_ram_segment_with_address@seg-3_198.js:10:20\n");
|
|
}
|
|
|
|
@end
|