Left: | ||
Right: |
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 |
kzar
2017/01/10 11:05:33
Nit: Since the addTestPaths call goes over multipl
Felix Dahlke
2017/01/17 19:41:08
Done.
| |
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 |
kzar
2017/01/10 11:05:34
Nit: We would normally put the closing parenthesis
Felix Dahlke
2017/01/17 19:41:08
We use the style above a lot, last time I checked
| |
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) |
kzar
2017/01/10 11:05:34
Nit: We usually use "for of" loops instead of forE
Felix Dahlke
2017/01/17 19:41:08
I prefer forEach when it comes down to actually in
| |
68 qunit(file); | |
LEFT | RIGHT |