promises-aplus-tests
Advanced tools
Comparing version 2.0.3 to 2.0.4
@@ -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" | ||
} | ||
} |
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
99945
23
2291
+ Addedavailable-typed-arrays@1.0.7(transitive)
+ Addedcall-bind@1.0.7(transitive)
+ Addedcommander@2.0.0(transitive)
+ Addeddefine-data-property@1.1.4(transitive)
+ Addedes-define-property@1.0.0(transitive)
+ Addedes-errors@1.3.0(transitive)
+ Addedfor-each@0.3.3(transitive)
+ Addedformatio@1.0.2(transitive)
+ Addedfunction-bind@1.1.2(transitive)
+ Addedget-intrinsic@1.2.4(transitive)
+ Addedgopd@1.0.1(transitive)
+ Addedhas-property-descriptors@1.0.2(transitive)
+ Addedhas-proto@1.0.3(transitive)
+ Addedhas-symbols@1.0.3(transitive)
+ Addedhas-tostringtag@1.0.2(transitive)
+ Addedhasown@2.0.2(transitive)
+ Addedis-arguments@1.1.1(transitive)
+ Addedis-callable@1.2.7(transitive)
+ Addedis-generator-function@1.0.10(transitive)
+ Addedis-typed-array@1.1.13(transitive)
+ Addedmocha@1.17.1(transitive)
+ Addedpossible-typed-array-names@1.0.0(transitive)
+ Addedsamsam@1.1.3(transitive)
+ Addedset-function-length@1.2.2(transitive)
+ Addedsinon@1.9.1(transitive)
+ Addedunderscore@1.6.0(transitive)
+ Addedutil@0.12.5(transitive)
+ Addedwhich-typed-array@1.1.15(transitive)
- Removedbuster-format@0.5.6(transitive)
- Removedmocha@1.13.0(transitive)
- Removedsinon@1.7.3(transitive)
- Removedunderscore@1.5.2(transitive)
Updatedmocha@~1.17.1
Updatedsinon@~1.9.0
Updatedunderscore@~1.6.0