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

Side by Side Diff: test_runner.js

Issue 29523651: Noissue - Enable source map for the tests (Closed) Base URL: https://hg.adblockplus.org/adblockpluscore/
Patch Set: Created Aug. 22, 2017, 12:14 p.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-2017 eyeo GmbH 3 * Copyright (C) 2006-2017 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 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
59 59
60 function webpackInMemory(bundleFilename, options) 60 function webpackInMemory(bundleFilename, options)
61 { 61 {
62 return new Promise((resolve, reject) => 62 return new Promise((resolve, reject) =>
63 { 63 {
64 // Based on this example 64 // Based on this example
65 // https://webpack.js.org/api/node/#custom-file-systems 65 // https://webpack.js.org/api/node/#custom-file-systems
66 let memoryFS = new MemoryFS(); 66 let memoryFS = new MemoryFS();
67 67
68 options.output = {filename: bundleFilename, path: "/"}; 68 options.output = {filename: bundleFilename, path: "/"};
69 options.devtool = "cheap-eval-source-map";
69 let webpackCompiler = webpack(options); 70 let webpackCompiler = webpack(options);
70 webpackCompiler.outputFileSystem = memoryFS; 71 webpackCompiler.outputFileSystem = memoryFS;
71 72
72 webpackCompiler.run((err, stats) => 73 webpackCompiler.run((err, stats) =>
73 { 74 {
74 // Error handling is based on this example 75 // Error handling is based on this example
75 // https://webpack.js.org/api/node/#error-handling 76 // https://webpack.js.org/api/node/#error-handling
76 if (err) 77 if (err)
77 { 78 {
78 let reason = err.stack || err; 79 let reason = err.stack || err;
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after
144 145
145 Promise.resolve(runBrowserTests()).catch(error => 146 Promise.resolve(runBrowserTests()).catch(error =>
146 { 147 {
147 console.error("Failed running browser tests"); 148 console.error("Failed running browser tests");
148 console.error(error); 149 console.error(error);
149 }).then(() => 150 }).then(() =>
150 { 151 {
151 if (unitFiles.length) 152 if (unitFiles.length)
152 nodeunit.reporters.default.run(unitFiles); 153 nodeunit.reporters.default.run(unitFiles);
153 }); 154 });
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