@@ -88,17 +88,17 @@ var isFullSuite = !isBundleTest && argv._.length === 0;
88
88
var testFileGlob ;
89
89
90
90
if ( isFullSuite ) {
91
- testFileGlob = path . join ( 'tests' , '*' + SUFFIX ) ;
91
+ testFileGlob = path . join ( __dirname , 'tests' , '*' + SUFFIX ) ;
92
92
} else if ( isBundleTest ) {
93
93
var _ = merge ( argv . bundleTest ) ;
94
94
95
95
if ( _ . length > 1 ) {
96
96
console . warn ( 'Can only run one bundle test suite at a time, ignoring ' , _ . slice ( 1 ) ) ;
97
97
}
98
98
99
- testFileGlob = path . join ( 'bundle_tests' , glob ( [ basename ( _ [ 0 ] ) ] ) ) ;
99
+ testFileGlob = path . join ( __dirname , 'bundle_tests' , glob ( [ basename ( _ [ 0 ] ) ] ) ) ;
100
100
} else {
101
- testFileGlob = path . join ( 'tests' , glob ( merge ( argv . _ ) . map ( basename ) ) ) ;
101
+ testFileGlob = path . join ( __dirname , 'tests' , glob ( merge ( argv . _ ) . map ( basename ) ) ) ;
102
102
}
103
103
104
104
var 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');
107
107
var pathToIE9mock = path . join ( __dirname , 'assets' , 'ie9_mock.js' ) ;
108
108
var pathToCustomMatchers = path . join ( __dirname , 'assets' , 'custom_matchers.js' ) ;
109
109
var pathToUnpolyfill = path . join ( __dirname , 'assets' , 'unpolyfill.js' ) ;
110
+ var pathToMathJax = path . join ( constants . pathToDist , 'extras' , 'mathjax' ) ;
110
111
111
112
var reporters = ( isFullSuite && ! argv . tags ) ? [ 'dots' , 'spec' ] : [ 'progress' ] ;
112
113
if ( argv . failFast ) reporters . push ( 'fail-fast' ) ;
@@ -134,7 +135,7 @@ function func(config) {
134
135
func . defaultConfig = {
135
136
136
137
// base path that will be used to resolve all patterns (eg. files, exclude)
137
- basePath : '.' ,
138
+ basePath : constants . pathToRoot ,
138
139
139
140
// frameworks to use
140
141
// available frameworks: https://npmjs.org/browse/keyword/karma-adapter
@@ -143,7 +144,13 @@ func.defaultConfig = {
143
144
// list of files / patterns to load in the browser
144
145
//
145
146
// 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
+ ] ,
147
154
148
155
// list of files / pattern to exclude
149
156
exclude : [ ] ,
0 commit comments