Skip to content

Commit

Permalink
standard fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
searls committed Jun 17, 2017
1 parent 9879780 commit 4b8df37
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 6 deletions.
3 changes: 1 addition & 2 deletions src/share/gather-props.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ export default (thing) => {
const originalThing = thing
const propNames = []

while(!isNativePrototype(thing)) {
while (!isNativePrototype(thing)) {
Object.getOwnPropertyNames(thing).forEach((propName) => {
if (propNames.indexOf(propName) === -1 && propName !== 'constructor') {
propNames.push(propName)
Expand All @@ -23,4 +23,3 @@ const isNativePrototype = (thing) => {

const excludePropertiesNotOnThing = (propNames, originalThing) =>
_.filter(propNames, (name) => name in originalThing)

3 changes: 1 addition & 2 deletions unit/function/imitate/copy-props.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,6 @@ module.exports = {
assert.strictEqual(targetPropDescriptor.enumerable, false)
},
'only copies props passed to it (and silently drops nonexistant ones)': () => {
const thing = {}
const original = {a: 1, b: 2, c: 3}
const target = {d: 4}

Expand All @@ -53,5 +52,5 @@ module.exports = {
assert.equal(target.c, 3)
assert.equal(target.d, 4)
assert.ok(!('e' in target))
},
}
}
4 changes: 2 additions & 2 deletions unit/share/filter-functions.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ module.exports = {
f: Number
}

const result = subject(target, ['a','b','c','d','e','f'])
const result = subject(target, ['a', 'b', 'c', 'd', 'e', 'f'])

assert.deepEqual(result, ['a', 'b', 'f'])
},
Expand All @@ -30,7 +30,7 @@ module.exports = {
SubThing.prototype.d = /hiiii/
SubThing.prototype.b = () => true

const result = subject(new SubThing(), ['a','b','c','d','e','f'])
const result = subject(new SubThing(), ['a', 'b', 'c', 'd', 'e', 'f'])

assert.deepEqual(result, ['a', 'b', 'e'])
}
Expand Down

0 comments on commit 4b8df37

Please sign in to comment.