Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
it( "can extract values like Object.values", function () {
expect( util.values( map ) )
.to.be.an( "array" )
.with.a.lengthOf( 3 )
.and.includes.members( [ 1, 2, 3 ] );
} );
it( "extend an object", function () {
const target = util.extend( {}, source );
const utils = Object.keys( util );
expect( util.extend( target, util ) )
.to.include.keys( utils );
expect( util.values( target ) )
.to.have.a.lengthOf( 5 + utils.length );
} );
it( "extend an empty object", function () {
const target = {};
expect( util.extend( target, source ) )
.to.be.an( "object" )
.that.includes.keys( Object.keys( source ) );
expect( util.values( target ) )
.to.include.members( [ 4, 5, 6, 7, 8 ] )
.and.have.a.lengthOf( 5 );
} );