WebWorldWind/test/test-main.js
Miguel Del Castillo 123415de3e Feature/build suggestions (#153)
* Extend package.json with additional metadata
Add command scripts in package.json
Update the dev dependencies
Update GruntSetup.txt, which should be moved to README.md eventually

* Remove unused third party libraries

* Remove build.js use ‘npm run build’ or ‘grunt’ instead

* Start cleaning the root folder (test-main.js)

* Updated markdown build guide to reflect the new streamlined build process

 - Added package-lock.json file generated by npm. It is suggested to
   commit it into the repository.
   See: https://docs.npmjs.com/files/package-lock.json

 - Removed build.js from Gruntfile.js. It's unnecessary now thanks to the
   new build process.

 - package.json had spaces in "type" and "url" declarations that
   were automatically removed in build process.

 - Added .idea/ folder to .gitignore. Consider removing the folder from
   the repository altogether.

* Removed zip file compress task from build process.

* Removed grunt-contrib-compress node module from package.json

 - The module is an unused dependency now, since we're not going to
   backup the whole codebase + artifacts in a zip file anymore.

* Removed .idea/ folder mistakenly added to .gitignore.

 - Only files that are unrelated to run configurations are added to
   gitignore.

* Further corrections to .gitignore. Removed WebWorldWind.zip reference.

* Further corrections to .gitignore. Removed WebWorldWind.zip reference.

* .gitignore cleanup. .iml file correction.
2017-06-30 10:53:30 -07:00

25 lines
787 B
JavaScript

var allTestFiles = [];
var TEST_REGEXP = /(spec|test)\.js$/i;
// Get a list of all the test files to include
Object.keys(window.__karma__.files).forEach(function(file) {
if (TEST_REGEXP.test(file)) {
// Normalize paths to RequireJS module names.
// If you require sub-dependencies of test files to be loaded as-is (requiring file extension)
// then do not normalize the paths
var normalizedTestModule = file.replace(/^\/base\/|\.js$/g, '');
allTestFiles.push(normalizedTestModule);
}
});
require.config({
// Karma serves files under /base, which is the basePath from your config file
baseUrl: '/base',
// dynamically load all test files
deps: allTestFiles,
// we have to kickoff jasmine, as it is asynchronous
callback: window.__karma__.start
});