@@ -7,6 +7,7 @@ var RavenConfigError = require('../src/configError');
7
7
var utils = require ( '../src/utils' ) ;
8
8
var isUndefined = utils . isUndefined ;
9
9
var isFunction = utils . isFunction ;
10
+ var isPlainObject = utils . isPlainObject ;
10
11
var isString = utils . isString ;
11
12
var isArray = utils . isArray ;
12
13
var isObject = utils . isObject ;
@@ -42,6 +43,20 @@ describe('utils', function() {
42
43
} ) ;
43
44
} ) ;
44
45
46
+ describe ( 'isPlainObject' , function ( ) {
47
+ it ( 'should do as advertised' , function ( ) {
48
+ assert . isTrue ( isPlainObject ( { } ) ) ;
49
+ assert . isTrue ( isPlainObject ( { foo : 'bar' } ) ) ;
50
+ assert . isTrue ( isPlainObject ( new Object ( ) ) ) ;
51
+ assert . isFalse ( isPlainObject ( [ ] ) ) ;
52
+ assert . isFalse ( isPlainObject ( undefined ) ) ;
53
+ assert . isFalse ( isPlainObject ( null ) ) ;
54
+ assert . isFalse ( isPlainObject ( 1 ) ) ;
55
+ assert . isFalse ( isPlainObject ( '' ) ) ;
56
+ assert . isFalse ( isPlainObject ( function ( ) { } ) ) ;
57
+ } ) ;
58
+ } ) ;
59
+
45
60
describe ( 'isString' , function ( ) {
46
61
it ( 'should do as advertised' , function ( ) {
47
62
assert . isTrue ( isString ( '' ) ) ;
0 commit comments