LEFT | RIGHT |
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-2016 Eyeo GmbH | 3 * Copyright (C) 2006-2016 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 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
44 if (testPath.split(path.sep).includes("browser")) | 44 if (testPath.split(path.sep).includes("browser")) |
45 { | 45 { |
46 if (path.extname(testPath) == ".html") | 46 if (path.extname(testPath) == ".html") |
47 qunitFiles.push(testPath); | 47 qunitFiles.push(testPath); |
48 } | 48 } |
49 else if (path.extname(testPath) == ".js") | 49 else if (path.extname(testPath) == ".js") |
50 nodeunitFiles.push(testPath); | 50 nodeunitFiles.push(testPath); |
51 } | 51 } |
52 } | 52 } |
53 if (process.argv.length > 2) | 53 if (process.argv.length > 2) |
| 54 { |
54 addTestPaths(process.argv.slice(2), true); | 55 addTestPaths(process.argv.slice(2), true); |
| 56 } |
55 else | 57 else |
| 58 { |
56 addTestPaths( | 59 addTestPaths( |
57 [path.join(__dirname, "test"), path.join(__dirname, "test", "browser")], | 60 [path.join(__dirname, "test"), path.join(__dirname, "test", "browser")], |
58 true); | 61 true |
| 62 ); |
| 63 } |
59 | 64 |
60 if (nodeunitFiles.length) | 65 if (nodeunitFiles.length) |
61 nodeunit.reporters.default.run(nodeunitFiles); | 66 nodeunit.reporters.default.run(nodeunitFiles); |
62 qunitFiles.forEach(file => qunit(path.resolve(file))); | 67 for (let file of qunitFiles) |
| 68 qunit(file); |
LEFT | RIGHT |