Gathering detailed insights and metrics for grunt-cordova-jasmine
Gathering detailed insights and metrics for grunt-cordova-jasmine
Gathering detailed insights and metrics for grunt-cordova-jasmine
Gathering detailed insights and metrics for grunt-cordova-jasmine
Grunt plugin to automate Jasmine suite execution for Apache Cordova plugins, inside emulators and devices
npm install grunt-cordova-jasmine
Typescript
Module System
NPM Version
JavaScript (96.35%)
CSS (3.65%)
Total Downloads
0
Last Day
0
Last Week
0
Last Month
0
Last Year
0
2 Stars
6 Commits
3 Watchers
2 Branches
1 Contributors
Updated on Jul 01, 2014
Latest Version
0.1.0
Package Id
grunt-cordova-jasmine@0.1.0
Size
15.02 kB
NPM Version
1.3.6
Cumulative downloads
Total Downloads
Last Day
0%
NaN
Compared to previous day
Last Week
0%
NaN
Compared to previous week
Last Month
0%
NaN
Compared to previous month
Last Year
0%
NaN
Compared to previous year
2
This project contains a Grunt plugin which automates Jasmine Test Suite execution for Apache Cordova plugins. Currently only the Android part is implemented.
You can find a relevant video which depicts the execution procedure here.
This plugin assumes that Android SDK, Ant and Git are already configured in the execution environment.
The plugin requires Grunt ~0.4.1
If you haven't used Grunt before, be sure to check out the Getting Started guide, as it explains how to create a Gruntfile as well as install and use Grunt plugins. Once you're familiar with that process, you may install this plugin with this command:
1npm install grunt-cordova-jasmine --save-dev
Once the plugin has been installed, it may be enabled inside your Gruntfile with this line of JavaScript:
1grunt.loadNpmTasks('grunt-cordova-jasmine');
This task configures the Cordova libraries, sets the given Cordova version, creates a Cordova project, installs the given plugin and executes the configured Jasmine test suite inside emulators and devices. You can execute the task by using:
execute-jasmine-suite:jasmine-suite-1
where jasmine-suite-1 is the jasmine id as shown below
1grunt.initConfig({ 2 grunt_cordova_jasmine: { 3 jasmine: [{ 4 id: "jasmine-suite-1", 5 project: { 6 android: { 7 targetDir: "./temp/projects/cordova-android", 8 name: "CordovaAndroid", 9 package_name: "org.example.cordova.android", 10 sdk: 'android-18', 11 cordova_version: "3.0.0" 12 } 13 }, 14 plugin_test: { 15 targetDir: "./temp/plugins", 16 testsDir: "./tests", 17 testsuite: "index.html", 18 plugin: '../aerogear-pushplugin-cordova' 19 }, 20 platforms: ["android"], 21 device_ids: { 22 android: [/*"emulator-5554", "emulator-5558"*/] 23 } 24 }], 25 cordova_libs: { 26 android: { 27 path: '', 28 git: { 29 url: "https://github.com/tolis-e/cordova-android.git", 30 targetDir: "./temp/cordova-libraries" 31 } 32 } 33 } 34 } 35});
Type: String
Description: A custom identifier which helps the plugin to read the correct configuration from the Gruntfile
Usage: [required]
Type: String
Description: Specifies the directory of the new Cordova Android project which is created by the plugin
Usage: [required]
Type: String
Description: Specifies the main activity name
Usage: [required]
Type: String
Description: Specifies the project's package
Usage: [required]
Type: String
Description: Specifies the target SDK
Usage: [optional]
Type: String
Description: Specifies the Cordova version
Usage: [optional]
This plugin has been tested for Cordova versions >=3.0.0
Type: String
Description: Specifies the directory to hold the fetched plugin
Usage: [required]
Type: String
Description: Specifies the directory which contains all the test resources (Jasmine Test Suite, JS libraries etc)
Usage: [required]
Type: String
Description: Specifies the Jasmine Test Suite which will be executed inside the emulators/devices
Usage: [required]
Type: String
Description: Local path of the plugin which is under testing or the Cordova plugin's registry id
Usage: [required]
Type: String
Description: Local path of the cordova-android library
Usage: [optional]
If this setting is not provided, the cordova-android library will be cloned from GitHub
Type: String
Description: GitHub URL of the repository which holds the cordova-android library
Usage: [optional]
Type: String
Description: The directory to hold the cloned cordova-android repository
Usage: [optional]
If cordova_libs_android_path is defined, then cordova_libs.git.url && cordova_libs.git.targetDir settings are ignored. If all settings are empty then the proccess stops with a failure status.
Type: Array
Description: Specifies the target platforms
Currently only android is supported
Type: Array
Description: Specifies the emulator/device serial numbers in which the Jasmine Suite should be executed.
If it is empty, the tests will be executed inside all the available emulators/devices recognized during the process execution.
The plugin expects that the Jasmine Test Suite contains the Jasmine HTML reporter.
1<script type="text/javascript" src="whatever/HtmlReporter.js"></script>
or
1<script type="text/javascript" src="whatever/jasmine-html.js"></script>
The Html reporter name should match one of the following regular expressions:
jasmine([^>]*)html([^>]*)js
or HtmlReporter([^>]*)js
In addition the plugin searches for a Jasmine addReporter and adds a custom reporter after this line.
The example folder contains a sample example which depicts how to use this plugin.
Released 01 November 2013
No vulnerabilities found.
Reason
no binaries found in the repo
Reason
0 existing vulnerabilities detected
Reason
Found 0/6 approved changesets -- score normalized to 0
Reason
0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0
Reason
no SAST tool detected
Details
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
security policy file not detected
Details
Reason
license file not detected
Details
Reason
project is not fuzzed
Details
Reason
branch protection not enabled on development/release branches
Details
Score
Last Scanned on 2025-07-07
The Open Source Security Foundation is a cross-industry collaboration to improve the security of open source software (OSS). The Scorecard provides security health metrics for open source projects.
Learn More