browserstack-tape-runner
Advanced tools
Comparing version 1.0.1 to 2.0.0
@@ -5,2 +5,19 @@ # Change Log | ||
<a name="2.0.0"></a> | ||
# [2.0.0](https://github.com/medikoo/browserstack-tape-runner/compare/v1.0.1...v2.0.0) (2018-04-09) | ||
### Features | ||
* generate browser suite at target ([4ab4110](https://github.com/medikoo/browserstack-tape-runner/commit/4ab4110)) | ||
* support Semaphore CI env ([dc66850](https://github.com/medikoo/browserstack-tape-runner/commit/dc66850)) | ||
### BREAKING CHANGES | ||
* Main program now takes working path as first argument. | ||
At this path in .browserstack-runner dir the suite will be creted | ||
<a name="1.0.1"></a> | ||
@@ -7,0 +24,0 @@ ## [1.0.1](https://github.com/medikoo/browserstack-tape-runner/compare/v1.0.0...v1.0.1) (2017-04-14) |
@@ -6,2 +6,3 @@ "use strict"; | ||
, toPlainObject = require("es5-ext/object/normalize-options") | ||
, ensureString = require("es5-ext/object/validate-stringifiable-value") | ||
, promisify = require("deferred").promisify | ||
@@ -11,6 +12,7 @@ , runBrowserstack = promisify(require("browserstack-runner").run) | ||
module.exports = function (filenames/* , config*/) { | ||
var config = toPlainObject(arguments[1]); | ||
module.exports = function (path, filenames/*, config*/) { | ||
path = ensureString(path); | ||
var config = toPlainObject(arguments[2]); | ||
return generateBundle(aFrom(ensureObject(filenames)))(function (data) { | ||
return generateBundle(path, aFrom(ensureObject(filenames)))(function (data) { | ||
// eslint-disable-next-line camelcase | ||
@@ -17,0 +19,0 @@ config.test_path = data.htmlPath; |
"use strict"; | ||
var resolve = require("path").resolve | ||
var errThrow = require("es5-ext/error/#/throw") | ||
, resolve = require("path").resolve | ||
, createWriteStream = require("fs").createWriteStream | ||
, Browserify = require("browserify") | ||
, Deferred = require("deferred") | ||
, unlink = Deferred.promisify(require("fs").unlink) | ||
, copy = require("fs2/copy") | ||
, rmdir = require("fs2/rmdir"); | ||
, bundlePath = resolve(__dirname, "test.bundle.js") | ||
, htmlPath = resolve(__dirname, "index.html") | ||
, tapeReporterPath = require.resolve("browserstack-tape-reporter"); | ||
var htmlPath = resolve(__dirname, "index.html") | ||
, tapeReporterPath = require.resolve("browserstack-tape-reporter"); | ||
module.exports = function (filenames) { | ||
var browserify = new Browserify(), deferred = new Deferred(), bundle | ||
, writeStream = createWriteStream(bundlePath); | ||
module.exports = function (path, filenames) { | ||
var targetPath = resolve(path, ".browserstack-runner"); | ||
browserify.add(filenames); | ||
browserify.add(tapeReporterPath); | ||
bundle = browserify.bundle(); | ||
bundle.pipe(writeStream); | ||
bundle.on("error", deferred.reject); | ||
writeStream.on("error", deferred.reject); | ||
writeStream.on("close", deferred.resolve.bind(null, { | ||
htmlPath: htmlPath, | ||
clear: function () { | ||
return unlink(bundlePath); | ||
} | ||
})); | ||
return deferred.promise; | ||
var clear = function () { | ||
return rmdir(targetPath, { loose: true, recursive: true, force: true }); | ||
}; | ||
var targetHtmlPath = resolve(targetPath, "index.html"); | ||
return copy(htmlPath, targetHtmlPath, { intermediate: true })(function () { | ||
var writeStream = createWriteStream(resolve(targetPath, "test.js")); | ||
var browserify = new Browserify(); | ||
browserify.add(filenames); | ||
browserify.add(tapeReporterPath); | ||
var bundle = browserify.bundle(); | ||
bundle.pipe(writeStream); | ||
var deferred = new Deferred(); | ||
bundle.on("error", deferred.reject); | ||
writeStream.on("error", deferred.reject); | ||
writeStream.on( | ||
"close", deferred.resolve.bind(null, { htmlPath: targetHtmlPath, clear: clear }) | ||
); | ||
return deferred.promise; | ||
}).catch(function (err) { | ||
var passErr = errThrow.bind(err); | ||
return clear()(passErr, passErr); | ||
}); | ||
}; |
{ | ||
"name": "browserstack-tape-runner", | ||
"version": "1.0.1", | ||
"version": "2.0.0", | ||
"description": "Run tape tests in browsers via browserstack", | ||
"author": "Mariusz Nowak <medyk@medikoo.com> (http://www.medikoo.com/)", | ||
"keywords": [ | ||
"test", | ||
"browserstack", | ||
"tape" | ||
], | ||
"bin": { | ||
"browserstack-tape-runner": "./bin/browserstack-tape-runner" | ||
}, | ||
"repository": { | ||
"type": "git", | ||
"url": "git://github.com/medikoo/browserstack-tape-runner.git" | ||
}, | ||
"keywords": ["test", "browserstack", "tape"], | ||
"bin": { "browserstack-tape-runner": "./bin/browserstack-tape-runner" }, | ||
"repository": { "type": "git", "url": "git://github.com/medikoo/browserstack-tape-runner.git" }, | ||
"dependencies": { | ||
"browserify": "^14.3", | ||
"browserstack-runner": "^0.5", | ||
"browserify": "^16.1.1", | ||
"browserstack-runner": "^0.7", | ||
"browserstack-tape-reporter": "^1.1", | ||
"deferred": "^0.7.6", | ||
"es5-ext": "^0.10.15", | ||
"glob": "^7.1.1", | ||
"deferred": "^0.7.9", | ||
"es5-ext": "^0.10.42", | ||
"fs2": "^0.2.7", | ||
"glob": "^7.1.2", | ||
"minimist": "^1.2" | ||
}, | ||
"devDependencies": { | ||
"eslint": "^3.18", | ||
"eslint-config-medikoo-es5": "1", | ||
"eslint": "^4.19.1", | ||
"eslint-config-medikoo-es5": "^1.4.9", | ||
"istanbul": "^0.4.5", | ||
"tape": "^4.6.3", | ||
"tape-index": "1" | ||
"tape": "^4.9", | ||
"tape-index": "2" | ||
}, | ||
"eslintConfig": { | ||
"extends": "medikoo-es5", | ||
"root": true, | ||
"env": { | ||
"node": true | ||
} | ||
}, | ||
"eslintConfig": { "extends": "medikoo-es5", "root": true, "env": { "node": true } }, | ||
"scripts": { | ||
"coverage": "tape-index && istanbul cover test.index.js", | ||
"check-coverage": "npm run coverage && istanbul check-coverage --statements 100 --function 100 --branches 100 --lines 100", | ||
"check-coverage": | ||
"npm run coverage && istanbul check-coverage --statements -2 --function -1 --branches 100 --lines -2", | ||
"lint": "eslint --ignore-path=.gitignore .", | ||
"test": "tape-index && node test.index.js" | ||
}, | ||
"license": "MIT" | ||
"license": "ISC" | ||
} |
@@ -0,2 +1,9 @@ | ||
[![*nix build status][nix-build-image]][nix-build-url] | ||
[![Windows build status][win-build-image]][win-build-url] | ||
[![Tests coverage][cov-image]][cov-url] | ||
![Transpilation status][transpilation-image] | ||
[![npm version][npm-image]][npm-url] | ||
# browserstack-tape-runner | ||
## Run tests configured with [tape](https://github.com/substack/tape) in browsers via [BrowserStack](https://browserstack.com) | ||
@@ -6,6 +13,5 @@ | ||
### Installation | ||
$ npm install -g browserstack-tape-runner | ||
$ npm install -g browserstack-tape-runner | ||
@@ -16,3 +22,3 @@ ### Usage | ||
$ browserstack-tape-runner --config browerstack.json test/**/*.js | ||
$ browserstack-tape-runner --config browerstack.json test/**/*.js | ||
@@ -29,2 +35,12 @@ For info on all options check `browserstack-tape-runner --help` | ||
$ npm test | ||
$ npm test | ||
[nix-build-image]: https://semaphoreci.com/api/v1/medikoo-org/sprintf-kit/branches/master/shields_badge.svg | ||
[nix-build-url]: https://semaphoreci.com/medikoo-org/sprintf-kit | ||
[win-build-image]: https://ci.appveyor.com/api/projects/status/r5a4ashx40l6uavw?svg=true | ||
[win-build-url]: https://ci.appveyor.com/api/projects/status/r5a4ashx40l6uavw | ||
[cov-image]: https://img.shields.io/codecov/c/github/medikoo/sprintf-kit.svg | ||
[cov-url]: https://codecov.io/gh/medikoo/sprintf-kit | ||
[transpilation-image]: https://img.shields.io/badge/transpilation-free-brightgreen.svg | ||
[npm-image]: https://img.shields.io/npm/v/sprintf-kit.svg | ||
[npm-url]: https://www.npmjs.com/package/sprintf-kit |
@@ -10,15 +10,7 @@ "use strict"; | ||
var config = { | ||
project: "browserstack-tape-runner-test", | ||
browsers: [{ | ||
browser: "chrome", | ||
// eslint-disable-next-line camelcase | ||
browser_version: "latest", | ||
os: "OS X", | ||
// eslint-disable-next-line camelcase | ||
os_version: "Sierra" | ||
}] | ||
}; | ||
var config = { project: "browserstack-tape-runner-test", browsers: ["chrome_latest"] }; | ||
runTests([resolve(playgroundPath, "tape-test.js")], config).done(function (report) { | ||
runTests(playgroundPath, [resolve(playgroundPath, "tape-test.js")], config).done(function ( | ||
report | ||
) { | ||
var data; | ||
@@ -36,3 +28,4 @@ | ||
t.end(); | ||
}, t.end); | ||
}, | ||
t.end); | ||
}); |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Filesystem access
Supply chain riskAccesses the file system, and could potentially read sensitive data.
Found 2 instances in 1 package
11997
44
8
13
86
3
+ Addedfs2@^0.2.7
+ Addedbrowser-resolve@2.0.0(transitive)
+ Addedbrowserify@16.5.2(transitive)
+ Addedbrowserstack-runner@0.7.0(transitive)
+ Addedbuffer@5.2.1(transitive)
+ Addeddetective@5.2.1(transitive)
+ Addeddomain-browser@1.2.0(transitive)
+ Addedes6-weak-map@2.0.3(transitive)
+ Addedevents@2.1.0(transitive)
+ Addedfs2@0.2.22(transitive)
+ Addedis-promise@2.2.2(transitive)
+ Addedlru-queue@0.1.0(transitive)
+ Addedmemoizee@0.4.17(transitive)
+ Addedminimatch@3.0.8(transitive)
+ Addedmkdirp-classic@0.5.3(transitive)
+ Addedmodule-deps@6.2.3(transitive)
+ Addedreadable-stream@3.6.2(transitive)
+ Addedstream-http@3.2.0(transitive)
+ Addedstring_decoder@1.3.0(transitive)
+ Addedvm-browserify@1.1.2(transitive)
- Removedacorn@5.7.4(transitive)
- Removedbrowser-resolve@1.11.3(transitive)
- Removedbrowserify@14.5.0(transitive)
- Removedbrowserstack-runner@0.5.2(transitive)
- Removedbuffer@5.7.1(transitive)
- Removedconcat-stream@1.5.2(transitive)
- Removeddetective@4.7.1(transitive)
- Removeddomain-browser@1.1.7(transitive)
- Removedevents@1.1.1(transitive)
- Removedindexof@0.0.1(transitive)
- Removedmodule-deps@4.1.1(transitive)
- Removedprocess-nextick-args@1.0.7(transitive)
- Removedreadable-stream@2.0.6(transitive)
- Removedstream-http@2.8.3(transitive)
- Removedstring_decoder@0.10.311.0.3(transitive)
- Removedto-arraybuffer@1.0.1(transitive)
- Removedtypedarray@0.0.7(transitive)
- Removedvm-browserify@0.0.4(transitive)
Updatedbrowserify@^16.1.1
Updatedbrowserstack-runner@^0.7
Updateddeferred@^0.7.9
Updatedes5-ext@^0.10.42
Updatedglob@^7.1.2