text: /* global describe, it, require */
  'use strict';
  
  // MODULES //
  
  var // Expectation library:
  	chai = require( 'chai' ),
  
  	// Module to be tested:
  	mean = require( './../lib/array.js' );
  
  
  // VARIABLES //
  
  var expect = chai.expect,
  	assert = chai.assert;
  
  
  // TESTS //
  
  describe( 'array mean', function tests() {
  
  	it( 'should export a function', function test() {
  		expect( mean ).to.be.a( 'function' );
  	});
  
  	it( 'should compute the distribution mean', function test() {
  		var k, actual, expected;
  
  		k = [ 2, 4, 8, 16 ];
  		actual = new Array( k.length );
  
  		actual = mean( actual, k );
  		expected = [ 2, 4, 8, 16 ];
  
  		assert.deepEqual( actual, expected );
  	});
  
  	it( 'should return an empty array if provided an empty array', function test() {
  		assert.deepEqual( mean( [], [] ), [] );
  	});
  
  	it( 'should handle non-numeric values by setting the element to NaN', function test() {
  		var data, actual, expected;
  
  		data = [ true, null, [], {} ];
  		actual = new Array( data.length );
  		actual = mean( actual, data );
  
  		expected = [ NaN, NaN, NaN, NaN ];
  
  		assert.deepEqual( actual, expected );
  	});
  
  });
  