testdouble
Advanced tools
Comparing version 3.1.0 to 3.1.1
# 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) |
@@ -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
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
1614277
28778