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

promises-aplus-tests

Package Overview
Dependencies
Maintainers
1
Versions
18
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

promises-aplus-tests - npm Package Compare versions

Comparing version 2.0.3 to 2.0.4

lib/getMochaOpts.js

21

lib/cli.js

@@ -5,2 +5,3 @@ #!/usr/bin/env node

var path = require("path");
var getMochaOpts = require("./getMochaOpts");
var programmaticRunner = require("./programmaticRunner");

@@ -10,3 +11,3 @@

var adapter = adapterObjectFromFilePath(filePath);
var mochaOpts = getMochaOpts();
var mochaOpts = getMochaOpts(process.argv.slice(3));
programmaticRunner(adapter, mochaOpts, function (err) {

@@ -26,20 +27,2 @@ if (err) {

function getMochaOpts() {
var rawOpts = process.argv.slice(3);
var opts = {};
rawOpts.join(" ").split("--").forEach(function (opt) {
var optSplit = opt.split(" ");
var key = optSplit[0];
var value = optSplit[1] === "" ? true : optSplit[1];
if (key) {
opts[key] = value;
}
});
return opts;
}
function adapterObjectFromFilePath(filePath) {

@@ -46,0 +29,0 @@ try {

@@ -11,14 +11,2 @@ /*jshint strict: false */

// Make the tests tolerant of older environments which don't have the correct semantics for `this` in strict mode
// (e.g. because they don't implement strict mode at all).
var defaultThisStrict = (function () {
"use strict";
return this;
}());
var defaultThisSloppy = (function () {
return this;
}());
describe("2.2.5 `onFulfilled` and `onRejected` must be called as functions (i.e. with no `this` value).", function () {

@@ -30,3 +18,3 @@ describe("strict mode", function () {

assert.strictEqual(this, defaultThisStrict);
assert.strictEqual(this, undefined);
done();

@@ -40,3 +28,3 @@ });

assert.strictEqual(this, defaultThisStrict);
assert.strictEqual(this, undefined);
done();

@@ -50,3 +38,3 @@ });

resolved(dummy).then(function onFulfilled() {
assert.strictEqual(this, defaultThisSloppy);
assert.strictEqual(this, global);
done();

@@ -58,3 +46,3 @@ });

rejected(dummy).then(null, function onRejected() {
assert.strictEqual(this, defaultThisSloppy);
assert.strictEqual(this, global);
done();

@@ -61,0 +49,0 @@ });

@@ -5,5 +5,5 @@ {

"keywords": ["promises", "promises-aplus"],
"version": "2.0.3",
"version": "2.0.4",
"implements": ["Promises/A+ 1.1.0"],
"author": "Domenic Denicola <domenic@domenicdenicola.com> (http://domenicdenicola.com)",
"author": "Domenic Denicola <domenic@domenicdenicola.com> (http://domenic.me)",
"license": "WTFPL",

@@ -20,12 +20,13 @@ "repository": {

"scripts": {
"lint": "jshint lib"
"lint": "jshint lib",
"test": "mocha"
},
"dependencies": {
"mocha": "~1.13.0",
"sinon": "~1.7.3",
"underscore": "~1.5.2"
"mocha": "~1.17.1",
"sinon": "~1.9.0",
"underscore": "~1.6.0"
},
"devDependencies": {
"jshint": "~2.3.0"
"jshint": "~2.4.4"
}
}
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