OLD | NEW |
1 var allTestFiles = []; | 1 var allTestFiles = []; |
2 var TEST_REGEXP = /(spec|test)\.js$/i; | 2 var TEST_REGEXP = /(_test|_multi)\.js$/i; |
3 | 3 |
4 var pathToModule = function(path) { | 4 var pathToModule = function(path) { |
5 return path.replace(/^\/base\//, '').replace(/\.js$/, ''); | 5 return path.replace(/^\/base\//, '').replace(/\.js$/, ''); |
6 }; | 6 }; |
7 | 7 |
| 8 var testsToSkip = [ |
| 9 // syntax error: |
| 10 '/base/gen/codegen_output/language/execute_finally6_test.js', |
| 11 '/base/gen/codegen_output/language/switch_label2_test.js', |
| 12 '/base/gen/codegen_output/language/infinite_switch_label_test.js', |
| 13 '/base/gen/codegen_output/language/switch_label_test.js', |
| 14 '/base/gen/codegen_output/language/nested_switch_label_test.js', |
| 15 '/base/gen/codegen_output/language/switch_try_catch_test.js', |
| 16 |
| 17 // module code execution error: |
| 18 '/base/gen/codegen_output/language/f_bounded_quantification3_test.js', |
| 19 '/base/gen/codegen_output/language/regress_16640_test.js', |
| 20 '/base/gen/codegen_output/language/regress_22666_test.js', |
| 21 '/base/gen/codegen_output/language/cyclic_type2_test.js', |
| 22 '/base/gen/codegen_output/language/mixin_regress_13688_test.js', |
| 23 ]; |
| 24 |
8 Object.keys(window.__karma__.files).forEach(function(file) { | 25 Object.keys(window.__karma__.files).forEach(function(file) { |
9 if (TEST_REGEXP.test(file)) { | 26 if (TEST_REGEXP.test(file) && testsToSkip.indexOf(file) == -1) { |
10 // Normalize paths to RequireJS module names. | 27 // Normalize paths to RequireJS module names. |
11 allTestFiles.push(pathToModule(file)); | 28 allTestFiles.push(pathToModule(file)); |
12 } | 29 } |
13 }); | 30 }); |
14 | 31 |
| 32 allTestFiles.push('test/browser/language_tests'); |
| 33 allTestFiles.push('test/browser/runtime_tests'); |
| 34 |
15 require.config({ | 35 require.config({ |
16 // Karma serves files under /base, which is the basePath from your config file | 36 // Karma serves files under /base, which is the basePath from your config file |
17 baseUrl: '/base', | 37 baseUrl: '/base', |
18 | 38 |
| 39 paths: { |
| 40 dart_sdk: 'lib/js/amd/dart_sdk', |
| 41 async_helper: 'gen/codegen_output/pkg/async_helper', |
| 42 expect: 'gen/codegen_output/pkg/expect', |
| 43 js: 'gen/codegen_output/pkg/js', |
| 44 matcher: 'gen/codegen_output/pkg/matcher', |
| 45 path: 'gen/codegen_output/pkg/path', |
| 46 stack_trace: 'gen/codegen_output/pkg/stack_trace', |
| 47 unittest: 'gen/codegen_output/pkg/unittest', |
| 48 }, |
| 49 |
19 // dynamically load all test files | 50 // dynamically load all test files |
20 deps: allTestFiles, | 51 deps: allTestFiles, |
21 | 52 |
22 // we have to kickoff jasmine, as it is asynchronous | 53 // we have to kickoff jasmine, as it is asynchronous |
23 callback: window.__karma__.start | 54 callback: window.__karma__.start |
24 }); | 55 }); |
OLD | NEW |