mirror of
https://github.com/zen-browser/pdf.js.git
synced 2025-07-10 02:05:37 +02:00
Implement a command line flag to skip Chrome when running tests
To save time or resources during development it can be useful to run tests only in Firefox. Previously this could be done by editing the browser manifest file, but since that file is no longer used for Puppeteer, this command line flag replaces it. For example, executing `gulp unittest --noChrome` will only run the unit tests in Firefox.
This commit is contained in:
parent
4834a276fd
commit
9ebb18f505
2 changed files with 12 additions and 1 deletions
|
@ -436,6 +436,9 @@ function createTestSource(testsName, bot) {
|
|||
if (bot) {
|
||||
args.push("--strictVerify");
|
||||
}
|
||||
if (process.argv.includes("--noChrome")) {
|
||||
args.push("--noChrome");
|
||||
}
|
||||
|
||||
var testProcess = startNode(args, { cwd: TEST_DIR, stdio: "inherit" });
|
||||
testProcess.on("close", function (code) {
|
||||
|
@ -454,6 +457,10 @@ function makeRef(done, bot) {
|
|||
if (bot) {
|
||||
args.push("--noPrompts", "--strictVerify");
|
||||
}
|
||||
if (process.argv.includes("--noChrome")) {
|
||||
args.push("--noChrome");
|
||||
}
|
||||
|
||||
var testProcess = startNode(args, { cwd: TEST_DIR, stdio: "inherit" });
|
||||
testProcess.on("close", function (code) {
|
||||
done();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue