@@ -7,6 +7,7 @@ var RavenConfigError = require('../src/configError');
77var utils = require ( '../src/utils' ) ;
88var isUndefined = utils . isUndefined ;
99var isFunction = utils . isFunction ;
10+ var isPlainObject = utils . isPlainObject ;
1011var isString = utils . isString ;
1112var isArray = utils . isArray ;
1213var isObject = utils . isObject ;
@@ -42,6 +43,20 @@ describe('utils', function() {
4243 } ) ;
4344 } ) ;
4445
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+
4560 describe ( 'isString' , function ( ) {
4661 it ( 'should do as advertised' , function ( ) {
4762 assert . isTrue ( isString ( '' ) ) ;
0 commit comments