Skip to content

Commit

Permalink
feat: add support for iOS simulators to API
Browse files Browse the repository at this point in the history
  • Loading branch information
zamotany committed Apr 9, 2019
1 parent af757ad commit 532850d
Show file tree
Hide file tree
Showing 17 changed files with 733 additions and 282 deletions.
Binary file added .DS_Store
Binary file not shown.
3 changes: 3 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -53,5 +53,8 @@
"eslint": "^5.16.0",
"jest": "^24.7.1",
"typescript": "^3.2.4"
},
"jest": {
"testRegex": "/__tests__/.*\\.(test|spec)\\.ts?$"
}
}
42 changes: 42 additions & 0 deletions src/__tests__/__fixtures__/android.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
export const ANDROID_RAW_LOG_FIXTURES = [
'04-08 00:58:53.967 E/storaged( 934): getDiskStats failed with result NOT_SUPPORTED and size 0',
'04-08 01:10:54.261 I/chatty ( 1383): uid=1000(system) ActivityManager expire 10 lines',
'04-08 01:10:54.990 V/chatty ( 1383): uid=1000 system_server expire 3 lines',
'04-08 01:32:25.371 W/wificond( 935): No pno scan started',
'04-08 01:32:25.371 D/wificond( 935): Scheduled scan is not running!',
];

export const ANDROID_PARSED_LOG_FIXTURES = [
{
date: new Date('2019-04-08T22:58:53.000Z'),
pid: 934,
priority: 5,
tag: 'storaged',
messages: ['getDiskStats failed with result NOT_SUPPORTED and size 0'],
platform: 'android',
},
{
date: new Date('2019-04-08T23:10:54.000Z'),
pid: 1383,
priority: 3,
tag: 'chatty',
messages: ['uid=1000(system) ActivityManager expire 10 lines'],
platform: 'android',
},
{
date: new Date('2019-04-08T23:32:25.000Z'),
pid: 935,
priority: 4,
tag: 'wificond',
messages: ['No pno scan started'],
platform: 'android',
},
{
date: new Date('2019-04-08T23:32:25.000Z'),
pid: 935,
priority: 2,
tag: 'wificond',
messages: ['Scheduled scan is not running!'],
platform: 'android',
},
];
67 changes: 67 additions & 0 deletions src/__tests__/__fixtures__/ios.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
export const IOS_RAW_LOG_FIXTURES = [
'2019-04-09 16:37:15.464004+0200 0xf3e23 Default 0x0 52389 0 testApp: (libnetwork.dylib) [com.apple.network:] nw_endpoint_flow_protocol_disconnected [C25.1 ::1.8081 cancelled socket-flow (null)] Output protocol disconnected',
'2019-04-09 16:37:15.464628+0200 0xf3e23 Default 0x0 52389 0 testApp: (CFNetwork) [com.apple.CFNetwork:Coalescing] removing all entries config 0x600001f5b600',
'2019-04-09 16:37:15.576332+0200 0xf3e27 Error 0x0 52389 0 testApp: JS test message',
'2019-04-09 16:37:15.614114+0200 0xf3e22 Default 0x0 52389 0 testApp: (CFNetwork) TCP Conn [26:0x600002a08480] using empty proxy configuration',
'2019-04-09 16:37:15.614124+0200 0xf1d08 Default 0x0 52389 0 testApp: Running application testApp ({\n initialProps = {\n};\n rootTag = 71;\n })',
'2019-04-09 16:37:15.614170+0200 0xf3e22 Default 0x0 52389 0 testApp1: (CFNetwork) TCP Conn 0x600002a08480 started',
];

export const IOS_PARSED_LOG_FIXTURES = [
{
date: new Date('2019-04-09 16:37:15.464004+0200'),
pid: 52389,
priority: 1,
tag: 'testApp',
messages: [
'(libnetwork.dylib) [com.apple.network:] nw_endpoint_flow_protocol_disconnected [C25.1 ::1.8081 cancelled socket-flow (null)] Output protocol disconnected',
],
platform: 'ios',
},
{
date: new Date('2019-04-09 16:37:15.464628+0200'),
pid: 52389,
priority: 1,
tag: 'testApp',
messages: [
'(CFNetwork) [com.apple.CFNetwork:Coalescing] removing all entries config 0x600001f5b600',
],
platform: 'ios',
},
{
date: new Date('2019-04-09 16:37:15.576332+0200'),
pid: 52389,
priority: 3,
tag: 'testApp',
messages: ['JS test message'],
platform: 'ios',
},
{
date: new Date('2019-04-09 16:37:15.614114+0200'),
pid: 52389,
priority: 1,
tag: 'testApp',
messages: [
'(CFNetwork) TCP Conn [26:0x600002a08480] using empty proxy configuration',
],
platform: 'ios',
},
{
date: new Date('2019-04-09 16:37:15.614124+0200'),
pid: 52389,
priority: 1,
tag: 'testApp',
messages: [
'Running application testApp ({\n initialProps = {\n};\n rootTag = 71;\n })',
],
platform: 'ios',
},
{
date: new Date('2019-04-09 16:37:15.614170+0200'),
pid: 52389,
priority: 1,
tag: 'testApp1',
messages: ['(CFNetwork) TCP Conn 0x600002a08480 started'],
platform: 'ios',
},
];
Loading

0 comments on commit 532850d

Please sign in to comment.