(name, f)
| 3 | |
| 4 | var tests = [], added = false; |
| 5 | function test(name, f) { |
| 6 | tests.push(function(filter) { |
| 7 | if (filter && name.indexOf(filter) == -1) return; |
| 8 | if (!added) { util.addFile(); added = true; } |
| 9 | util.addTest(); |
| 10 | |
| 11 | f(new tern.Server({defs: [util.ecmascript], debug: true})); |
| 12 | }); |
| 13 | } |
| 14 | |
| 15 | exports.runTests = function(filter) { |
| 16 | tests.forEach(function(test) { test(filter); }); |