Last change
on this file since 6c1585f was 6a3a178, checked in by Ema <ema_spirova@…>, 3 years ago |
initial commit
|
-
Property mode
set to
100644
|
File size:
712 bytes
|
Rev | Line | |
---|
[6a3a178] | 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
|
---|
Note:
See
TracBrowser
for help on using the repository browser.