mirror of
https://github.com/mozilla/pdf.js.git
synced 2025-04-19 14:48:08 +02:00
Implement optionally running the tests in headless mode
This commit prepares for running the font tests on GitHub Actions where we can't spin up headful browsers because there are no display capabilities on the workers. This will also be useful for porting other test targets to GitHub Actions at a later time, as well as running the tests locally in headless mode.
This commit is contained in:
parent
a1d84f8ce1
commit
69452bb60e
2 changed files with 18 additions and 3 deletions
|
@ -684,6 +684,9 @@ function createTestSource(testsName, { bot = false, xfaOnly = false } = {}) {
|
|||
if (process.argv.includes("--noChrome") || forceNoChrome) {
|
||||
args.push("--noChrome");
|
||||
}
|
||||
if (process.argv.includes("--headless")) {
|
||||
args.push("--headless");
|
||||
}
|
||||
|
||||
const testProcess = startNode(args, { cwd: TEST_DIR, stdio: "inherit" });
|
||||
testProcess.on("close", function (code) {
|
||||
|
@ -712,6 +715,9 @@ function makeRef(done, bot) {
|
|||
if (process.argv.includes("--noChrome") || forceNoChrome) {
|
||||
args.push("--noChrome");
|
||||
}
|
||||
if (process.argv.includes("--headless")) {
|
||||
args.push("--headless");
|
||||
}
|
||||
|
||||
const testProcess = startNode(args, { cwd: TEST_DIR, stdio: "inherit" });
|
||||
testProcess.on("close", function (code) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue