Skip to content

Commit

Permalink
chore(dep): tweak typescript version
Browse files Browse the repository at this point in the history
  • Loading branch information
伍程凯 committed Aug 9, 2018
1 parent 4e8656c commit 5315398
Show file tree
Hide file tree
Showing 4 changed files with 2,544 additions and 2,522 deletions.
24 changes: 20 additions & 4 deletions __tests__/specs/isEmptyValueObj.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ describe('isEmptyValueObj method', function () {
expect(isEmptyValueObj(null)).toBe(true)
expect(isEmptyValueObj(undefined)).toBe(true)
expect(isEmptyValueObj([1, 2, 3])).toBe(false)
expect(isEmptyValueObj([1, 2, undefined])).toBe(false)
expect(isEmptyValueObj([1, 2, null])).toBe(false)
expect(isEmptyValueObj([1, 2, undefined])).toBe(true)
expect(isEmptyValueObj([1, 2, null])).toBe(true)
expect(isEmptyValueObj({})).toBe(true)
expect(isEmptyValueObj({ name: 'tom' })).toBe(false)

Expand All @@ -28,14 +28,30 @@ describe('isEmptyValueObj method', function () {
name: 'lee',
age: 18,
empty_object: [{ name: undefined }]
}, 1)
}, 2)
).toBe(true)
expect(
isEmptyValueObj({
name: 'lee',
age: 18,
empty_object: [{ person: { name: 'lee' } }]
}, 1)
}, 3)
).toBe(false)
expect(
isEmptyValueObj({
name: 'lee',
age: 18,
empty_object: [{ person: { name: 'lee' } }],
empty_object2: [{ name: 'tom', array: [undefined, null, 1] }]
}, 2)
).toBe(false)
expect(
isEmptyValueObj({
name: 'lee',
age: 18,
empty_object: [{ person: { name: 'lee' } }],
empty_object2: [{ name: 'tom', array: [undefined, null, 1] }]
}, 3)
).toBe(true)
})
})
Loading

0 comments on commit 5315398

Please sign in to comment.