New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

testdouble

Package Overview
Dependencies
Maintainers
2
Versions
115
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

testdouble - npm Package Compare versions

Comparing version 1.6.2 to 1.7.0

7

CHANGELOG.md
# Change Log
## [v1.7.0](https://github.com/testdouble/testdouble.js/tree/v1.7.0) (2016-09-18)
[Full Changelog](https://github.com/testdouble/testdouble.js/compare/v1.6.2...v1.7.0)
**Merged pull requests:**
- Upgrade to lodash 4.15.0 [\#132](https://github.com/testdouble/testdouble.js/pull/132) ([searls](https://github.com/searls))
## [v1.6.2](https://github.com/testdouble/testdouble.js/tree/v1.6.2) (2016-09-18)

@@ -4,0 +11,0 @@ [Full Changelog](https://github.com/testdouble/testdouble.js/compare/v1.6.1...v1.6.2)

2

generated/test/src/object-test.js

@@ -7,3 +7,3 @@ // Generated by CoffeeScript 1.10.0

describe('td.object', function() {
describe.only('making a test double object based on a Prototypal thing', function() {
describe('making a test double object based on a Prototypal thing', function() {
Given(function() {

@@ -10,0 +10,0 @@ var Thing;

@@ -5,3 +5,7 @@ // Generated by CoffeeScript 1.10.0

_ = require('lodash');
_ = {
every: require('lodash/every'),
isEqual: require('lodash/isEqual'),
isFunction: require('lodash/isFunction')
};

@@ -15,3 +19,3 @@ module.exports = function(expectedArgs, actualArgs, config) {

} else {
return _.eq(expectedArgs, actualArgs);
return _.isEqual(expectedArgs, actualArgs);
}

@@ -25,3 +29,3 @@ };

equalsWithMatchers = function(expectedArgs, actualArgs) {
return _.all(expectedArgs, function(expectedArg, i) {
return _.every(expectedArgs, function(expectedArg, i) {
return argumentMatchesExpectation(expectedArg, actualArgs[i]);

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

} else {
return _.eq(expectedArg, actualArg);
return _.isEqual(expectedArg, actualArg);
}

@@ -39,0 +43,0 @@ };

@@ -5,3 +5,7 @@ // Generated by CoffeeScript 1.10.0

_ = require('lodash');
_ = {
each: require('lodash/each'),
extend: require('lodash/extend'),
keys: require('lodash/keys')
};

@@ -8,0 +12,0 @@ stringifyAnything = require('./stringify/anything');

@@ -5,3 +5,5 @@ // Generated by CoffeeScript 1.10.0

_ = require('lodash');
_ = {
reduce: require('lodash/reduce')
};

@@ -8,0 +10,0 @@ store = require('./store');

@@ -6,3 +6,5 @@ // Generated by CoffeeScript 1.10.0

_ = require('lodash');
_ = {
tap: require('lodash/tap')
};

@@ -9,0 +11,0 @@ store = require('./store');

@@ -5,3 +5,5 @@ // Generated by CoffeeScript 1.10.0

_ = require('lodash');
_ = {
isFunction: require('lodash/isFunction')
};

@@ -8,0 +10,0 @@ create = require('./create');

@@ -6,3 +6,5 @@ // Generated by CoffeeScript 1.10.0

_ = require('lodash');
_ = {
isFunction: require('lodash/isFunction')
};

@@ -9,0 +11,0 @@ stringifyArguments = require('../stringify/arguments');

@@ -5,3 +5,13 @@ // Generated by CoffeeScript 1.10.0

_ = require('lodash');
_ = {
every: require('lodash/every'),
includes: require('lodash/includes'),
isArray: require('lodash/isArray'),
isBoolean: require('lodash/isBoolean'),
isEqual: require('lodash/isEqual'),
isNumber: require('lodash/isNumber'),
isPlainObject: require('lodash/isPlainObject'),
isString: require('lodash/isString'),
some: require('lodash/some')
};

@@ -51,3 +61,3 @@ log = require('../log');

containsAllSpecified = function(containing, actual) {
return _.all(containing, function(val, key) {
return _.every(containing, function(val, key) {
if (actual == null) {

@@ -59,10 +69,10 @@ return false;

} else {
return _.eq(val, actual[key]);
return _.isEqual(val, actual[key]);
}
});
};
return _.all(containings, function(containing) {
return _.every(containings, function(containing) {
if (_.isArray(containing)) {
return _.any(actualArg, function(actualElement) {
return _.eq(actualElement, containing);
return _.some(actualArg, function(actualElement) {
return _.isEqual(actualElement, containing);
});

@@ -72,3 +82,3 @@ } else if (_.isPlainObject(containing) && _.isPlainObject(actualArg)) {

} else {
return _.include(actualArg, containing);
return _.includes(actualArg, containing);
}

@@ -91,3 +101,3 @@ });

expected = matcherArgs[0];
return !_.eq(expected, actual);
return !_.isEqual(expected, actual);
}

@@ -94,0 +104,0 @@ })

@@ -5,3 +5,14 @@ // Generated by CoffeeScript 1.10.0

_ = require('lodash');
_ = {
extend: require('lodash/extend'),
functions: require('lodash/functions'),
includes: require('lodash/includes'),
isArray: require('lodash/isArray'),
isFunction: require('lodash/isFunction'),
isPlainObject: require('lodash/isPlainObject'),
isString: require('lodash/isString'),
reduce: require('lodash/reduce'),
tap: require('lodash/tap'),
union: require('lodash/union')
};

@@ -54,3 +65,3 @@ tdFunction = require('./function');

createTestDoublesForFunctionBag = function(bag) {
return _(bag).functions().reduce(function(memo, functionName) {
return _.reduce(_.functions(bag), function(memo, functionName) {
memo[functionName] = tdFunction("." + functionName);

@@ -62,3 +73,3 @@ return memo;

createTestDoublesForFunctionNames = function(names) {
return _(names).reduce(function(memo, functionName) {
return _.reduce(names, function(memo, functionName) {
memo[functionName] = tdFunction("." + functionName);

@@ -73,3 +84,3 @@ return memo;

get: function(target, propKey, receiver) {
if (!obj.hasOwnProperty(propKey) && !_.include(config.excludeMethods, propKey)) {
if (!obj.hasOwnProperty(propKey) && !_.includes(config.excludeMethods, propKey)) {
obj[propKey] = proxy[propKey] = tdFunction((nameOf(name)) + "#" + propKey);

@@ -76,0 +87,0 @@ }

@@ -5,3 +5,6 @@ // Generated by CoffeeScript 1.10.0

_ = require('lodash');
_ = {
isFunction: require('lodash/isFunction'),
isPlainObject: require('lodash/isPlainObject')
};

@@ -8,0 +11,0 @@ object = require('../object');

@@ -5,3 +5,5 @@ // Generated by CoffeeScript 1.10.0

_ = require('lodash');
_ = {
isString: require('lodash/isString')
};

@@ -8,0 +10,0 @@ replaceModule = require('./module');

@@ -5,3 +5,6 @@ // Generated by CoffeeScript 1.10.0

_ = require('lodash');
_ = {
functions: require('lodash/functions'),
some: require('lodash/some')
};

@@ -12,5 +15,5 @@ module.exports = function(thing) {

}
return _(thing.prototype).functions().any();
return _.some(_.functions(thing.prototype));
};
}).call(this);

@@ -5,2 +5,6 @@ // Generated by CoffeeScript 1.10.0

_ = {
capitalize: require('lodash/capitalize')
};
imitate = require('./imitate');

@@ -18,4 +22,2 @@

_ = require('lodash');
module.exports = function(object, property, manualReplacement) {

@@ -22,0 +24,0 @@ var fakeThing, isManual, realThing, realThingExists;

@@ -5,3 +5,5 @@ // Generated by CoffeeScript 1.10.0

_ = require('lodash');
_ = {
each: require('lodash/each')
};

@@ -8,0 +10,0 @@ module.exports = function(testDoubleFunctionBag) {

@@ -5,3 +5,5 @@ // Generated by CoffeeScript 1.10.0

_ = require('lodash');
_ = {
each: require('lodash/each')
};

@@ -8,0 +10,0 @@ quibble = require('quibble');

@@ -5,3 +5,6 @@ // Generated by CoffeeScript 1.10.0

_ = require('lodash');
_ = {
filter: require('lodash/filter'),
tap: require('lodash/tap')
};

@@ -47,3 +50,3 @@ store = require('./index');

where: function(testDouble, args, config) {
return _.select(store["for"](testDouble).calls, function(call) {
return _.filter(store["for"](testDouble).calls, function(call) {
return argsMatch(args, call.args, config);

@@ -50,0 +53,0 @@ });

@@ -5,3 +5,6 @@ // Generated by CoffeeScript 1.10.0

_ = require('lodash');
_ = {
find: require('lodash/find'),
tap: require('lodash/tap')
};

@@ -27,3 +30,3 @@ EventEmitter = require('events').EventEmitter;

}
if (entry = _(globalStore).find({
if (entry = _.find(globalStore, {
testDouble: testDouble

@@ -30,0 +33,0 @@ })) {

@@ -5,3 +5,8 @@ // Generated by CoffeeScript 1.10.0

_ = require('lodash');
_ = {
each: require('lodash/each'),
findLast: require('lodash/findLast'),
last: require('lodash/last'),
some: require('lodash/some')
};

@@ -42,3 +47,3 @@ store = require('./index');

stubbingFor = function(testDouble, actualArgs) {
return _(store["for"](testDouble).stubbings).findLast(function(stubbing) {
return _.findLast(store["for"](testDouble).stubbings, function(stubbing) {
return isSatisfied(stubbing, actualArgs);

@@ -45,0 +50,0 @@ });

@@ -5,3 +5,6 @@ // Generated by CoffeeScript 1.10.0

_ = require('lodash');
_ = {
includes: require('lodash/includes'),
isString: require('lodash/isString')
};

@@ -12,3 +15,3 @@ stringifyObject = require('stringify-object');

if (_.isString(anything)) {
if (_.contains(anything, '\n')) {
if (_.includes(anything, '\n')) {
return "\"\"\"\n" + anything + "\n\"\"\"";

@@ -15,0 +18,0 @@ } else {

@@ -5,3 +5,5 @@ // Generated by CoffeeScript 1.10.0

_ = require('lodash');
_ = {
map: require('lodash/map')
};

@@ -17,3 +19,3 @@ stringifyAnything = require('./anything');

}
return _(args).map(function(arg) {
return _.map(args, function(arg) {
return "" + wrapper + (stringifyAnything(arg)) + wrapper;

@@ -20,0 +22,0 @@ }).join(joiner);

@@ -5,3 +5,6 @@ // Generated by CoffeeScript 1.10.0

_ = require('lodash');
_ = {
find: require('lodash/find'),
reduce: require('lodash/reduce')
};

@@ -8,0 +11,0 @@ store = require('./store');

// Generated by CoffeeScript 1.10.0
(function() {
module.exports = '1.6.2';
module.exports = '1.7.0';
}).call(this);

@@ -6,3 +6,6 @@ // Generated by CoffeeScript 1.10.0

_ = require('lodash');
_ = {
assign: require('lodash/assign'),
some: require('lodash/some')
};

@@ -76,3 +79,3 @@ calls = require('./store/calls');

}
if (!_(args).some(callback.isCallback)) {
if (!_.some(args, callback.isCallback)) {
return args.concat(callback);

@@ -79,0 +82,0 @@ } else {

{
"name": "testdouble",
"version": "1.6.2",
"version": "1.7.0",
"description": "A minimal test double library for TDD with JavaScript",

@@ -49,3 +49,3 @@ "homepage": "https://github.com/testdouble/testdouble.js",

"dependencies": {
"lodash": "^3.10.1",
"lodash": "^4.15.0",
"quibble": "^0.3.0",

@@ -52,0 +52,0 @@ "stringify-object": "^2.4.0"

Sorry, the diff of this file is too big to display

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

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

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

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

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

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