npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

karma-ios-hybrid-app-launcher

v0.1.1

Published

A karma launcher for hybrid apps on iOS.

Downloads

7

Readme

CircleCI

karma-ios-hybrid-app-launcher

: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.

Installation

npm install -D karma-ios-hybrid-app-launcher

Requirements

Xcode should be installed on the system. /usr/bin/xcodebuild should exist on the system.

Manual Cleanup

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.

Usage

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.

iOS Hybrid App Requirements

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.

Debugging Karma Tests

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.

Contributing

See the CONTRIBUTING doc.

Running the tests

npm run test

Debugging

There is a vs code debug profile for debugging the karma test. Just press F5 in vs code.