@pacote/is-plain-object
Advanced tools
Comparing version 1.0.2 to 1.0.3
{ | ||
"name": "@pacote/is-plain-object", | ||
"description": "Checks whether the provided object is a plain JavaScript object.", | ||
"version": "1.0.2", | ||
"version": "1.0.3", | ||
"license": "MIT", | ||
@@ -28,3 +28,3 @@ "author": { | ||
"scripts": {}, | ||
"gitHead": "71815c6657e9fe1ed67cd577378200ed950d56f2" | ||
"gitHead": "f4eee3cb22223e523407d360bb6f606fc3dd2e67" | ||
} |
@@ -13,3 +13,3 @@ import { | ||
test('true for plain objects', () => { | ||
test('Plain objects are plain objects', () => { | ||
assert( | ||
@@ -22,3 +22,3 @@ property(object(), o => { | ||
test('true for instances of Proxy', () => { | ||
test('Proxy is a plain object', () => { | ||
assert( | ||
@@ -31,11 +31,11 @@ property(object(), o => { | ||
test('false for undefined', () => { | ||
test('Undefined is not a plain object', () => { | ||
expect(isPlainObject(undefined)).toBe(false) | ||
}) | ||
test('false for null', () => { | ||
test('Null is not a plain object', () => { | ||
expect(isPlainObject(null)).toBe(false) | ||
}) | ||
test('false for booleans', () => { | ||
test('A boolean is not a plain object', () => { | ||
expect(isPlainObject(true)).toBe(false) | ||
@@ -45,3 +45,3 @@ expect(isPlainObject(false)).toBe(false) | ||
test('false for strings', () => { | ||
test('A string is not a plain object', () => { | ||
assert( | ||
@@ -54,3 +54,3 @@ property(string(), s => { | ||
test('false for numbers', () => { | ||
test('A number is not a plain object', () => { | ||
assert( | ||
@@ -63,3 +63,3 @@ property(float(), f => { | ||
test('false for functions', () => { | ||
test('A function is not a plain object', () => { | ||
assert( | ||
@@ -72,3 +72,3 @@ property(func(anything()), f => { | ||
test('false for arrays', () => { | ||
test('An array is not a plain object', () => { | ||
assert( | ||
@@ -81,7 +81,7 @@ property(array(anything()), a => { | ||
test('false for Symbols', () => { | ||
test('Symbol is not a plain object', () => { | ||
expect(isPlainObject(Symbol())).toBe(false) | ||
}) | ||
test('false for instances of RegExp', () => { | ||
test('RegExp is not a plain object', () => { | ||
expect(isPlainObject(/a/)).toBe(false) | ||
@@ -91,3 +91,3 @@ expect(isPlainObject(RegExp(''))).toBe(false) | ||
test('false for Promises', () => { | ||
test('Promise is not a plain object', () => { | ||
expect(isPlainObject(Promise.resolve())).toBe(false) | ||
@@ -114,4 +114,4 @@ }) | ||
['WeakSet', WeakSet] | ||
])('false for instances of %s', (_, ArrayClass) => { | ||
])('%s is not a plain object', (_, ArrayClass) => { | ||
expect(isPlainObject(new ArrayClass())).toBe(false) | ||
}) |
Sorry, the diff of this file is not supported yet
733432