forked from kishikawakatsumi/JavaScriptBridge
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathJSBEventKitUITest.m
More file actions
43 lines (30 loc) · 975 Bytes
/
JSBEventKitUITest.m
File metadata and controls
43 lines (30 loc) · 975 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
#import <XCTest/XCTest.h>
#import "JavaScriptBridge.h"
@import JavaScriptCore;
@interface JSBEventKitUITests : XCTestCase
@end
@implementation JSBEventKitUITests
- (void)setUp
{
[super setUp];
}
- (void)tearDown
{
[super tearDown];
}
- (void)testInstantiation
{
JSContext *context = [[JSContext alloc] init];
[context addScriptingSupport:@"EventKitUI"];
JSValue *value = nil;
[context evaluateScript:@"var ekcalendarchooser = EKCalendarChooser.new();"];
value = context[@"ekcalendarchooser"];
XCTAssertTrue(value && !value.isUndefined);
[context evaluateScript:@"var ekeventeditviewcontroller = EKEventEditViewController.new();"];
value = context[@"ekeventeditviewcontroller"];
XCTAssertTrue(value && !value.isUndefined);
[context evaluateScript:@"var ekeventviewcontroller = EKEventViewController.new();"];
value = context[@"ekeventviewcontroller"];
XCTAssertTrue(value && !value.isUndefined);
}
@end