@@ -88,17 +88,17 @@ var isFullSuite = !isBundleTest && argv._.length === 0;
8888var testFileGlob ;
8989
9090if ( isFullSuite ) {
91- testFileGlob = path . join ( 'tests' , '*' + SUFFIX ) ;
91+ testFileGlob = path . join ( __dirname , 'tests' , '*' + SUFFIX ) ;
9292} else if ( isBundleTest ) {
9393 var _ = merge ( argv . bundleTest ) ;
9494
9595 if ( _ . length > 1 ) {
9696 console . warn ( 'Can only run one bundle test suite at a time, ignoring ' , _ . slice ( 1 ) ) ;
9797 }
9898
99- testFileGlob = path . join ( 'bundle_tests' , glob ( [ basename ( _ [ 0 ] ) ] ) ) ;
99+ testFileGlob = path . join ( __dirname , 'bundle_tests' , glob ( [ basename ( _ [ 0 ] ) ] ) ) ;
100100} else {
101- testFileGlob = path . join ( 'tests' , glob ( merge ( argv . _ ) . map ( basename ) ) ) ;
101+ testFileGlob = path . join ( __dirname , 'tests' , glob ( merge ( argv . _ ) . map ( basename ) ) ) ;
102102}
103103
104104var pathToShortcutPath = path . join ( __dirname , '..' , '..' , 'tasks' , 'util' , 'shortcut_paths.js' ) ;
@@ -107,6 +107,7 @@ var pathToJQuery = path.join(__dirname, 'assets', 'jquery-1.8.3.min.js');
107107var pathToIE9mock = path . join ( __dirname , 'assets' , 'ie9_mock.js' ) ;
108108var pathToCustomMatchers = path . join ( __dirname , 'assets' , 'custom_matchers.js' ) ;
109109var pathToUnpolyfill = path . join ( __dirname , 'assets' , 'unpolyfill.js' ) ;
110+ var pathToMathJax = path . join ( constants . pathToDist , 'extras' , 'mathjax' ) ;
110111
111112var reporters = ( isFullSuite && ! argv . tags ) ? [ 'dots' , 'spec' ] : [ 'progress' ] ;
112113if ( argv . failFast ) reporters . push ( 'fail-fast' ) ;
@@ -134,7 +135,7 @@ function func(config) {
134135func . defaultConfig = {
135136
136137 // base path that will be used to resolve all patterns (eg. files, exclude)
137- basePath : '.' ,
138+ basePath : constants . pathToRoot ,
138139
139140 // frameworks to use
140141 // available frameworks: https://npmjs.org/browse/keyword/karma-adapter
@@ -143,7 +144,13 @@ func.defaultConfig = {
143144 // list of files / patterns to load in the browser
144145 //
145146 // N.B. the rest of this field is filled below
146- files : [ pathToCustomMatchers , pathToUnpolyfill ] ,
147+ files : [
148+ pathToCustomMatchers ,
149+ pathToUnpolyfill ,
150+ // available to fetch from /base/path/to/mathjax
151+ // more info: http://karma-runner.github.io/3.0/config/files.html
152+ { pattern : pathToMathJax + '/**' , included : false , watched : false , served : true }
153+ ] ,
147154
148155 // list of files / pattern to exclude
149156 exclude : [ ] ,
0 commit comments