| OLD | NEW | 
|    1 /* |    1 /* | 
|    2  * This file is part of Adblock Plus <https://adblockplus.org/>, |    2  * This file is part of Adblock Plus <https://adblockplus.org/>, | 
|    3  * Copyright (C) 2006-present eyeo GmbH |    3  * Copyright (C) 2006-present eyeo GmbH | 
|    4  * |    4  * | 
|    5  * Adblock Plus is free software: you can redistribute it and/or modify |    5  * Adblock Plus is free software: you can redistribute it and/or modify | 
|    6  * it under the terms of the GNU General Public License version 3 as |    6  * it under the terms of the GNU General Public License version 3 as | 
|    7  * published by the Free Software Foundation. |    7  * published by the Free Software Foundation. | 
|    8  * |    8  * | 
|    9  * Adblock Plus is distributed in the hope that it will be useful, |    9  * Adblock Plus is distributed in the hope that it will be useful, | 
|   10  * but WITHOUT ANY WARRANTY; without even the implied warranty of |   10  * but WITHOUT ANY WARRANTY; without even the implied warranty of | 
| (...skipping 135 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
|  146     } |  146     } | 
|  147   }).then(bundle => |  147   }).then(bundle => | 
|  148     Promise.all( |  148     Promise.all( | 
|  149       processes.map(currentProcess => |  149       processes.map(currentProcess => | 
|  150         runnerDefinitions[currentProcess]( |  150         runnerDefinitions[currentProcess]( | 
|  151           bundle, bundleFilename, |  151           bundle, bundleFilename, | 
|  152           browserFiles.map( |  152           browserFiles.map( | 
|  153             file => path.relative(path.join(__dirname, "test", "browser"), |  153             file => path.relative(path.join(__dirname, "test", "browser"), | 
|  154                                   file).replace(/\.js$/, "") |  154                                   file).replace(/\.js$/, "") | 
|  155           ) |  155           ) | 
 |  156         ).catch(error => Promise.reject( | 
 |  157           `Unit test "${currentProcess}" failed: ${error}`) | 
|  156         ) |  158         ) | 
|  157       ) |  159       ) | 
|  158     ) |  160     ) | 
|  159   ); |  161   ); | 
|  160 } |  162 } | 
|  161  |  163  | 
|  162 if (process.argv.length > 2) |  164 if (process.argv.length > 2) | 
|  163   addTestPaths(process.argv.slice(2), true); |  165   addTestPaths(process.argv.slice(2), true); | 
|  164 else |  166 else | 
|  165 { |  167 { | 
|  166   addTestPaths( |  168   addTestPaths( | 
|  167     [path.join(__dirname, "test"), path.join(__dirname, "test", "browser")], |  169     [path.join(__dirname, "test"), path.join(__dirname, "test", "browser")], | 
|  168     true |  170     true | 
|  169   ); |  171   ); | 
|  170 } |  172 } | 
|  171  |  173  | 
|  172 Promise.resolve(runBrowserTests(runnerProcesses)).catch(error => |  174 Promise.resolve(runBrowserTests(runnerProcesses)).then(() => | 
|  173 { |  | 
|  174   console.error("Failed running browser tests"); |  | 
|  175   console.error(error); |  | 
|  176 }).then(() => |  | 
|  177 { |  175 { | 
|  178   if (unitFiles.length) |  176   if (unitFiles.length) | 
|  179     nodeunit.reporters.default.run(unitFiles); |  177     nodeunit.reporters.default.run(unitFiles); | 
 |  178 }).catch(error => | 
 |  179 { | 
 |  180   if (!error) | 
 |  181     console.error("Failed running browser tests"); | 
 |  182   else | 
 |  183     console.error(error); | 
 |  184   process.exit(1); | 
|  180 }); |  185 }); | 
| OLD | NEW |