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 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
70 path.dirname(require.resolve("nodeunit")), | 70 path.dirname(require.resolve("nodeunit")), |
71 "examples", "browser", "nodeunit.js" | 71 "examples", "browser", "nodeunit.js" |
72 ); | 72 ); |
73 browserFiles.unshift(nodeunitPath); | 73 browserFiles.unshift(nodeunitPath); |
74 | 74 |
75 let urls = browserFiles.map(file => | 75 let urls = browserFiles.map(file => |
76 { | 76 { |
77 return url.format({ | 77 return url.format({ |
78 protocol: "file", | 78 protocol: "file", |
79 slashes: "true", | 79 slashes: "true", |
80 pathname: path.resolve(process.cwd, file).split(path.sep).join("/") | 80 pathname: path.resolve(process.cwd(), file).split(path.sep).join("/") |
81 }); | 81 }); |
82 }); | 82 }); |
83 let args = [path.join(__dirname, "browsertests.js")].concat(urls); | 83 let args = [path.join(__dirname, "browsertests.js")].concat(urls); |
84 childProcess.execFileSync(phantomjs.path, args, {stdio: "inherit"}); | 84 childProcess.execFileSync(phantomjs.path, args, {stdio: "inherit"}); |
85 } | 85 } |
86 if (unitFiles.length) | 86 if (unitFiles.length) |
87 nodeunit.reporters.default.run(unitFiles); | 87 nodeunit.reporters.default.run(unitFiles); |
LEFT | RIGHT |