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

testdouble

Package Overview
Dependencies
Maintainers
1
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 3.1.0 to 3.1.1

3

CHANGELOG.md
# Change Log
## [v3.1.1](https://github.com/testdouble/testdouble.js/tree/v3.1.1) (2017-06-20)
[Full Changelog](https://github.com/testdouble/testdouble.js/compare/v3.1.0...v3.1.1)
## [v3.1.0](https://github.com/testdouble/testdouble.js/tree/v3.1.0) (2017-06-18)

@@ -4,0 +7,0 @@ [Full Changelog](https://github.com/testdouble/testdouble.js/compare/v3.0.0...v3.1.0)

2

lib/share/copy-props.js

@@ -20,5 +20,5 @@ 'use strict';

value: original[name],
enumerable: Object.propertyIsEnumerable(original, name)
enumerable: Object.propertyIsEnumerable.call(original, name)
};
}));
};

@@ -6,2 +6,2 @@ 'use strict';

});
exports.default = '3.1.0';
exports.default = '3.1.1';
{
"name": "testdouble",
"version": "3.1.0",
"version": "3.1.1",
"description": "A minimal test double library for TDD with JavaScript",

@@ -5,0 +5,0 @@ "homepage": "https://github.com/testdouble/testdouble.js",

@@ -10,5 +10,5 @@ import _ from '../wrap/lodash'

value: original[name],
enumerable: Object.propertyIsEnumerable(original, name)
enumerable: Object.propertyIsEnumerable.call(original, name)
}
}))
}

@@ -1,1 +0,1 @@

export default '3.1.0'
export default '3.1.1'

@@ -44,2 +44,24 @@ import subject from '../../src/share/copy-props'

},
'copies enumerable props and marks them enumerable': () => {
const foo = () => {}
const original = {a: 42, b: foo}
const target = {}
subject(original, target, ['a', 'b'])
assert.equal(target.a, 42)
assert.strictEqual(Object.getOwnPropertyDescriptor(target, 'a').enumerable, true)
assert.equal(target.b, foo)
assert.strictEqual(Object.getOwnPropertyDescriptor(target, 'b').enumerable, true)
},
'does not blow up if propertyIsEnumerable has been axed': () => {
const original = {a: 42}
const target = {}
original.propertyIsEnumerable = undefined
subject(original, target, ['a'])
assert.equal(target.a, 42)
assert.strictEqual(Object.getOwnPropertyDescriptor(target, 'a').enumerable, true)
},
'only copies props passed to it (and silently drops nonexistant ones)': () => {

@@ -46,0 +68,0 @@ const original = {a: 1, b: 2, c: 3}

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

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

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