grunt-saucelabs
Advanced tools
Comparing version 5.0.0 to 5.0.1
{ | ||
"name": "grunt-saucelabs", | ||
"description": "Grunt task running tests using Sauce Labs. Supports QUnit, Jasmine, Mocha and YUI tests", | ||
"version": "5.0.0", | ||
"version": "5.0.1", | ||
"homepage": "https://github.com/axemclion/grunt-saucelabs", | ||
@@ -6,0 +6,0 @@ "author": { |
@@ -47,2 +47,3 @@ grunt-saucelabs | ||
urls: ['array of URLs for unit test pages'], | ||
build: process.env.CI_BUILD_NUMBER, | ||
tunneled: 'true (default) / false; false if you choose to skip creating a Sauce connect tunnel.', | ||
@@ -89,3 +90,4 @@ tunnelTimeout: 'A numeric value indicating the time to wait before closing all tunnels', | ||
* __testname__: The name of this test, displayed on the Sauce Labs dashboard. _Optional_ | ||
* __tags__: An array of tags displayed for this test on the Sauce Labs dashboard. This can be the build number, commit number, etc, that can be obtained from grunt. _Optional_ | ||
* __build__: The build number for this test. _Optional_ | ||
* __tags__: An array of tags displayed for this test on the Sauce Labs dashboard. This can be the commit number, branch name, etc, that can be obtained from grunt. _Optional_ | ||
* __browsers__: An array of objects representing the [various browsers](https://saucelabs.com/docs/platforms) on which this test should run. _Optional_ | ||
@@ -92,0 +94,0 @@ * __testInterval__ : Number of milliseconds between each retry to see if a test is completed or not (default: 5000). _Optional_ |
@@ -130,2 +130,7 @@ module.exports = function(grunt) { | ||
grunt.log.writeln("Platform: %s", result.platform); | ||
if (tunnelIdentifier && unsupportedPort(url)) { | ||
grunt.log.writeln("Warning: This url might use a port that is not proxied by Sauce Connect.".yellow); | ||
} | ||
if (result.passed === undefined){ | ||
@@ -138,4 +143,2 @@ grunt.log.error(result.result.message); | ||
//onTestComplete(result); | ||
}, function(e){ | ||
@@ -272,2 +275,20 @@ grunt.log.error('some error? %s', e); | ||
function unsupportedPort(url) { | ||
// Not all ports are proxied by Sauce Connect. List of supported ports is | ||
// available at https://saucelabs.com/docs/connect#localhost | ||
var portRegExp = /:(\d+)\//; | ||
var matches = portRegExp.exec(url); | ||
var port = matches ? parseInt(matches[1], 10) : null; | ||
var supportedPorts = [80, 443, 888, 2000, 2001, 2020, 2109, 2222, 2310, 3000, 3001, 3030, | ||
3210, 3333, 4000, 4001, 4040, 4321, 4502, 4503, 4567, 5000, 5001, 5050, 5555, 5432, 6000, | ||
6001, 6060, 6666, 6543, 7000, 7070, 7774, 7777, 8000, 8001, 8003, 8031, 8080, 8081, 8765, | ||
8888, 9000, 9001, 9080, 9090, 9876, 9877, 9999, 49221, 55001]; | ||
if (port) { | ||
return supportedPorts.indexOf(port) === -1; | ||
} | ||
return false; | ||
} | ||
grunt.registerMultiTask('saucelabs-jasmine', 'Run Jasmine test cases using Sauce Labs browsers', function() { | ||
@@ -274,0 +295,0 @@ var done = this.async(), |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
603642
18991
164
0