Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code

Side by Side Diff: test_runner.js

Issue 29891693: Issue 6987 - Fix regression preventing running individual tests (Closed) Base URL: https://hg.adblockplus.org/adblockpluscore/
Patch Set: Created Sept. 26, 2018, 2:50 a.m.
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 101 matching lines...) Expand 10 before | Expand all | Expand 10 after
112 memoryFS.unlinkSync("/" + bundleFilename); 112 memoryFS.unlinkSync("/" + bundleFilename);
113 resolve(bundle); 113 resolve(bundle);
114 } 114 }
115 }); 115 });
116 }); 116 });
117 } 117 }
118 118
119 function runBrowserTests(processes) 119 function runBrowserTests(processes)
120 { 120 {
121 if (!browserFiles.length) 121 if (!browserFiles.length)
122 return; 122 return Promise.resolve();
Manish Jethani 2018/09/26 10:36:49 LGTM, for next bookmark.
123 123
124 let nodeunitPath = path.join(__dirname, "node_modules", "nodeunit", 124 let nodeunitPath = path.join(__dirname, "node_modules", "nodeunit",
125 "examples", "browser", "nodeunit.js"); 125 "examples", "browser", "nodeunit.js");
126 let bundleFilename = "bundle.js"; 126 let bundleFilename = "bundle.js";
127 127
128 return webpackInMemory(bundleFilename, { 128 return webpackInMemory(bundleFilename, {
129 entry: path.join(__dirname, "test", "browser", "_bootstrap.js"), 129 entry: path.join(__dirname, "test", "browser", "_bootstrap.js"),
130 module: { 130 module: {
131 rules: [{ 131 rules: [{
132 resource: nodeunitPath, 132 resource: nodeunitPath,
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
178 178
179 runBrowserTests(runnerProcesses).then(() => 179 runBrowserTests(runnerProcesses).then(() =>
180 { 180 {
181 if (unitFiles.length) 181 if (unitFiles.length)
182 nodeunit.reporters.default.run(unitFiles); 182 nodeunit.reporters.default.run(unitFiles);
183 }).catch(error => 183 }).catch(error =>
184 { 184 {
185 console.error(error); 185 console.error(error);
186 process.exit(1); 186 process.exit(1);
187 }); 187 });
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld