Security News
Weekly Downloads Now Available in npm Package Search Results
Socket's package search now displays weekly downloads for npm packages, helping developers quickly assess popularity and make more informed decisions.
karma-ios-hybrid-app-launcher
Advanced tools
:warning: This is pre-production software and not recommended for production use.
A karma launcher for hybrid apps on iOS.
Use this launcher to run karma tests in a webview-based iOS app.
npm install -D karma-ios-hybrid-app-launcher
Xcode should be installed on the system. /usr/bin/xcodebuild
should exist on the system.
This plugin will leave a simulator on your system named "karma-ios-hybrid-app-simulator" (unless your config sets the "configSimulatorName" field). It will re-use this simulator on re-runs. It is up to the developer to manually delete this simulator if cleanup is desired.
Update your karma config to use this plugin and set it as a "browser", and also provide a config object with the hybrid native test app name and app path.
browsers: ["iOSHybridApp"],
plugins: ["karma-ios-hybrid-app-launcher", /* other plugins here */],
iOSHybridApp: {
packageId: "ios-test-app",
appPath: path.resolve("./ios-test-app/ios-test-app.app"),
},
An example karma config is in this repo.
A url will be passed by Webdriver agent to start the app. This url points to Karma endpoint that will serve a page with Jasmine tests. This url is processed inside the view controller.
If you want to be able to tap the "DEBUG" button on the karma test page that runs in the webview and have it load that debug page inside the webview (instead of opening in the browser) you'll need to implement the delegate method for WKNavigationDelegate
, see the example ios app.
Note that when you open the debug page the original karma (non-debug) page will navigate away so the karma runner will think it's disconnected from the original page and console output will show errors, but if you attach a remote debugger to your webview you will see that the debug page does actually run the karma tests. Auto watch won't work but in the debug tools you can just refresh the page after updating your tests.
See the CONTRIBUTING doc.
npm run test
There is a vs code debug profile for debugging the karma test. Just press F5
in vs code.
FAQs
A karma launcher for hybrid apps on iOS.
The npm package karma-ios-hybrid-app-launcher receives a total of 0 weekly downloads. As such, karma-ios-hybrid-app-launcher popularity was classified as not popular.
We found that karma-ios-hybrid-app-launcher demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Socket's package search now displays weekly downloads for npm packages, helping developers quickly assess popularity and make more informed decisions.
Security News
A Stanford study reveals 9.5% of engineers contribute almost nothing, costing tech $90B annually, with remote work fueling the rise of "ghost engineers."
Research
Security News
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.