CB-11824 - Update tests to include objective-c tests
This closes #19
diff --git a/.travis.yml b/.travis.yml
index b9af4c5..83aaf0d 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -1,4 +1,12 @@
-language: node_js
+osx_image: xcode7.3
+language: objective-c
sudo: false
-node_js:
- - "4.2"
+before_install:
+ - npm cache clean -f
+ - npm install -g n
+ - n stable
+ - node --version
+install:
+ - npm install
+script:
+ - npm test
diff --git a/package.json b/package.json
index 1065738..506ad1c 100644
--- a/package.json
+++ b/package.json
@@ -3,9 +3,6 @@
"version": "1.0.4-dev",
"description": "The official Apache Cordova WKWebView Engine Plugin",
"main": "index.js",
- "scripts": {
- "test": "echo \"Error: no test specified\" && exit 1"
- },
"repository": {
"type": "git",
"url": "https://git-wip-us.apache.org/repos/asf/cordova-plugin-wkwebview-engine.git"
@@ -15,8 +12,10 @@
"wkwebview"
],
"scripts": {
- "test": "npm run jshint",
- "jshint": "node node_modules/jshint/bin/jshint src"
+ "test": "npm run jshint && npm run objc-tests",
+ "objc-tests": "cd tests/ios && npm test",
+ "preobjc-tests": "cd tests/ios && npm install",
+ "jshint": "node_modules/.bin/jshint src"
},
"author": "Apache Cordova",
"license": "Apache-2.0",
diff --git a/tests/ios/CDVWKWebViewEngineTest/CDVWKWebViewEngineTest.xcodeproj/project.pbxproj b/tests/ios/CDVWKWebViewEngineTest/CDVWKWebViewEngineTest.xcodeproj/project.pbxproj
index 74436bd..14a8d3b 100644
--- a/tests/ios/CDVWKWebViewEngineTest/CDVWKWebViewEngineTest.xcodeproj/project.pbxproj
+++ b/tests/ios/CDVWKWebViewEngineTest/CDVWKWebViewEngineTest.xcodeproj/project.pbxproj
@@ -329,12 +329,7 @@
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
- HEADER_SEARCH_PATHS = (
- "$(inherited)",
- "\"$(TARGET_BUILD_DIR)/usr/local/lib/include\"",
- "\"$(OBJROOT)/UninstalledProducts/include\"",
- "\"$(BUILT_PRODUCTS_DIR)\"",
- );
+ HEADER_SEARCH_PATHS = "$(inherited)";
IPHONEOS_DEPLOYMENT_TARGET = 8.0;
MTL_ENABLE_DEBUG_INFO = YES;
ONLY_ACTIVE_ARCH = YES;
@@ -372,11 +367,7 @@
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
- HEADER_SEARCH_PATHS = (
- "$(inherited)",
- "\"$(TARGET_BUILD_DIR)/usr/local/lib/include\"",
- "\n\"$(OBJROOT)/UninstalledProducts/include\"\n\"$(BUILT_PRODUCTS_DIR)\"",
- );
+ HEADER_SEARCH_PATHS = "$(inherited)";
IPHONEOS_DEPLOYMENT_TARGET = 8.0;
MTL_ENABLE_DEBUG_INFO = NO;
OTHER_LDFLAGS = "-ObjC";
diff --git a/tests/ios/package.json b/tests/ios/package.json
index 4c1ace3..e747d3b 100644
--- a/tests/ios/package.json
+++ b/tests/ios/package.json
@@ -8,6 +8,6 @@
"cordova-ios": "*"
},
"scripts": {
- "test": "xcodebuild test -workspace CDVWKWebViewEngineTest.xcworkspace -scheme CDVWKWebViewEngineLibTests -destination 'platform=iOS Simulator,name=iPhone 5' CONFIGURATION_BUILD_DIR='/tmp' HEADER_SEARCH_PATHS='$(OBJROOT)/UninstalledProducts/$(PLATFORM_NAME)/include'"
+ "test": "xcodebuild test -workspace CDVWKWebViewEngineTest.xcworkspace -scheme CDVWKWebViewEngineLibTests -destination \"platform=iOS Simulator,name=iPhone 5\""
}
}