text: /**
  * @license Apache-2.0
  *
  * Copyright (c) 2018 The Stdlib Authors.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
  * You may obtain a copy of the License at
  *
  *    http://www.apache.org/licenses/LICENSE-2.0
  *
  * Unless required by applicable law or agreed to in writing, software
  * distributed under the License is distributed on an "AS IS" BASIS,
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
  
  'use strict';
  
  // MODULES //
  
  var tape = require( 'tape' );
  var IS_BROWSER = require( '@stdlib/assert/is-browser' );
  var isEmptyArray = require( '@stdlib/assert/is-empty-array' );
  var isObjectArray = require( '@stdlib/assert/is-plain-object-array' );
  var lint = require( './../lib/sync.js' );
  var createFixtures = require( './fixtures' );
  
  
  // VARIABLES //
  
  var opts = {
  	'skip': IS_BROWSER
  };
  var fixtures;
  if ( !IS_BROWSER ) {
  	fixtures = createFixtures();
  }
  
  
  // TESTS //
  
  tape( 'main export is a function', opts, function test( t ) {
  	t.ok( true, __filename );
  	t.strictEqual( typeof lint, 'function', 'main export is a function' );
  	t.end();
  });
  
  tape( 'if provided a first argument which is not a list of files, the function throws an error (no header argument)', opts, function test( t ) {
  	var values;
  	var i;
  
  	values = [
  		'5',
  		5,
  		NaN,
  		true,
  		false,
  		null,
  		void 0,
  		{},
  		function noop() {}
  	];
  
  	for ( i = 0; i < values.length; i++ ) {
  		t.throws( badValue( values[i] ), TypeError, 'throws a type error when provided '+values[i] );
  	}
  	t.end();
  
  	function badValue( value ) {
  		return function badValue() {
  			lint( value );
  		};
  	}
  });
  
  tape( 'if provided a first argument which is not a list of files, the function throws an error (header argument)', opts, function test( t ) {
  	var values;
  	var i;
  
  	values = [
  		'5',
  		5,
  		NaN,
  		true,
  		false,
  		null,
  		void 0,
  		{},
  		function noop() {}
  	];
  
  	for ( i = 0; i < values.length; i++ ) {
  		t.throws( badValue( values[i] ), TypeError, 'throws a type error when provided '+values[i] );
  	}
  	t.end();
  
  	function badValue( value ) {
  		return function badValue() {
  			lint( value, '@license Apache-2.0' );
  		};
  	}
  });
  
  tape( 'if provided a header argument which is not either a string, RegExp, or an object mapping file types to license header strings and/or regular expressions, the function throws an error', opts, function test( t ) {
  	var values;
  	var i;
  
  	values = [
  		5,
  		NaN,
  		true,
  		false,
  		null,
  		void 0,
  		[],
  		{
  			'foo': null
  		},
  		{
  			'js': []
  		},
  		{
  			'js': {}
  		},
  		{
  			'awk': '# @license Apache-2.0',
  			'js': '// @license Apache-2.0',
  			'jl': 3.14
  		},
  		function noop() {}
  	];
  
  	for ( i = 0; i < values.length; i++ ) {
  		t.throws( badValue( values[i] ), TypeError, 'throws a type error when provided '+values[i] );
  	}
  	t.end();
  
  	function badValue( value ) {
  		return function badValue() {
  			lint( [ __filename ], value );
  		};
  	}
  });
  
  tape( 'the function returns an error if an error is encountered when linting files', opts, function test( t ) {
  	var files;
  	var errs;
  
  	files = [ 'dakfjdlfjsdfjasdjf/aldfkajdlfjsadl.jsdfad' ]; // File should not exist!
  
  	errs = lint( files );
  	t.strictEqual( errs instanceof Error, true, 'returns an error' );
  
  	t.end();
  });
  
  tape( 'the function returns an error if an error is encountered when linting files (header argument)', opts, function test( t ) {
  	var files;
  	var errs;
  
  	files = [ 'dakfjdlfjsdfjasdjf/aldfkajdlfjsadl.jsdfad' ]; // File should not exist!
  
  	errs = lint( files, '// @license Apache-2.0' );
  	t.strictEqual( errs instanceof Error, true, 'returns an error' );
  
  	t.end();
  });
  
  tape( 'the function returns an empty array if provided an empty file array', opts, function test( t ) {
  	var errs = lint( [] );
  	t.strictEqual( isEmptyArray( errs ), true, 'returns an empty array' );
  	t.end();
  });
  
  tape( 'the function returns an empty array if provided an empty file array (header argument)', opts, function test( t ) {
  	var errs = lint( [], '// @license Apache-2.0' );
  	t.strictEqual( isEmptyArray( errs ), true, 'returns an empty array' );
  	t.end();
  });
  
  tape( 'the function returns an empty array if all files are valid', opts, function test( t ) {
  	var errs = lint( fixtures.good );
  	t.strictEqual( isEmptyArray( errs ), true, 'returns an empty array' );
  	t.end();
  });
  
  tape( 'the function returns an object array if files are not valid', opts, function test( t ) {
  	var errs = lint( fixtures.bad );
  	t.strictEqual( isObjectArray( errs ), true, 'returns an object array' );
  	t.end();
  });
  
  tape( 'the function returns an object array if files are not valid (multiple headers)', opts, function test( t ) {
  	var errs = lint( fixtures.multiple );
  	t.strictEqual( isObjectArray( errs ), true, 'returns an object array' );
  	t.strictEqual( errs.length, 1, 'has expected length' );
  	t.end();
  });
  
  tape( 'the function returns an object array if files are not valid (start location)', opts, function test( t ) {
  	var errs = lint( fixtures.startLocation );
  	t.strictEqual( isObjectArray( errs ), true, 'returns an object array' );
  	t.strictEqual( errs.length, 1, 'has expected length' );
  	t.end();
  });
  
  tape( 'the function supports specifying a license header string to lint against', opts, function test( t ) {
  	var header;
  	var errs;
  
  	header= '// This file is licensed under Apache-2.0.';
  	errs = lint( fixtures.good, header );
  
  	t.strictEqual( isObjectArray( errs ), true, 'returns an object array' );
  	t.end();
  });
  
  tape( 'the function supports specifying a license header regular expression to lint against', opts, function test( t ) {
  	var header;
  	var errs;
  
  	header = /\/\/ This file is licensed under Apache-2\.0\./;
  	errs = lint( fixtures.good, header );
  
  	t.strictEqual( isObjectArray( errs ), true, 'returns an object array' );
  	t.end();
  });
  
  tape( 'the function supports specifying a license header object mapping strings and/or regular expressions to filename extensions', opts, function test( t ) {
  	var header;
  	var errs;
  
  	header = {
  		'js': /\/\/ This file is licensed under Apache-2\.0\./,
  		'awk': '# This file is licensed under Apache-2.0.'
  	};
  	errs = lint( fixtures.good, header );
  
  	t.strictEqual( isObjectArray( errs ), true, 'returns an object array' );
  	t.end();
  });
  
  tape( 'the function supports specifying an empty license header object', opts, function test( t ) {
  	var header;
  	var errs;
  
  	header = {};
  	errs = lint( fixtures.good, header );
  
  	t.strictEqual( isEmptyArray( errs ), true, 'returns an empty array' );
  	t.end();
  });
  
  tape( 'the function supports specifying a default license header when providing an object mapping strings and/or regular expressions to filename extensions (valid)', opts, function test( t ) {
  	var header;
  	var errs;
  
  	header = {
  		'default': /(?:[#!*] |)@license Apache-2\.0/
  	};
  	errs = lint( fixtures.good, header );
  
  	t.strictEqual( isEmptyArray( errs ), true, 'returns an empty array' );
  	t.end();
  });
  
  tape( 'the function supports specifying a default license header when providing an object mapping strings and/or regular expressions to filename extensions (invalid)', opts, function test( t ) {
  	var header;
  	var errs;
  
  	header = {
  		'default': /(?:[#!*] |)@license Apache-2\.0/
  	};
  	errs = lint( fixtures.bad, header );
  
  	t.strictEqual( isObjectArray( errs ), true, 'returns an object array' );
  	t.end();
  });
  