Bug:Fix file validation issue
[vnfsdk/refrepo.git] / vnfmarket / src / main / webapp / vnfmarket / node_modules / karma / requirejs.config.tpl.coffee
1 allTestFiles = []
2 TEST_REGEXP = /(spec|test)(\.coffee)?(\.js)?$/i
3
4 # Get a list of all the test files to include
5 Object.keys(window.__karma__.files).forEach (file) ->
6
7   if TEST_REGEXP.test(file)
8     # Normalize paths to RequireJS module names.
9     # If you require sub-dependencies of test files to be loaded as-is (requiring file extension)
10     # then do not normalize the paths
11     allTestFiles.push file.replace(/^\/base\/|\.js$/g, '')
12   return
13
14 require.config
15   # Karma serves files under /base, which is the basePath from your config file
16   baseUrl: "/base"
17
18   # dynamically load all test files
19   deps: allTestFiles
20
21   # we have to kickoff jasmine, as it is asynchronous
22   callback: window.__karma__.start