Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

browserstack-tape-runner

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

browserstack-tape-runner - npm Package Compare versions

Comparing version 1.0.1 to 2.0.0

17

CHANGELOG.md

@@ -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)

8

index.js

@@ -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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc