mirror of https://github.com/zulip/zulip.git
test-js-with-puppeteer: Run with node --experimental-strip-types.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
This commit is contained in:
parent
45de69465a
commit
26c72bf7ec
|
@ -63,12 +63,7 @@ options = parser.parse_args()
|
||||||
|
|
||||||
|
|
||||||
def run_single_test(test_file: str, test_number: int, total_tests: int) -> int:
|
def run_single_test(test_file: str, test_number: int, total_tests: int) -> int:
|
||||||
cmd = [
|
cmd = ["node", "--experimental-strip-types", "--no-warnings=ExperimentalWarning", test_file]
|
||||||
os.path.join(ZULIP_PATH, "node_modules/.bin/ts-node"),
|
|
||||||
"--script-mode",
|
|
||||||
"--transpile-only",
|
|
||||||
test_file,
|
|
||||||
]
|
|
||||||
|
|
||||||
test_name = os.path.basename(test_file)
|
test_name = os.path.basename(test_file)
|
||||||
cmd_str = shlex.join(cmd)
|
cmd_str = shlex.join(cmd)
|
||||||
|
|
|
@ -2,6 +2,7 @@ import assert from "node:assert/strict";
|
||||||
import "css.escape";
|
import "css.escape";
|
||||||
import path from "node:path";
|
import path from "node:path";
|
||||||
import timersPromises from "node:timers/promises";
|
import timersPromises from "node:timers/promises";
|
||||||
|
import * as url from "node:url";
|
||||||
|
|
||||||
import ErrorStackParser from "error-stack-parser";
|
import ErrorStackParser from "error-stack-parser";
|
||||||
import type {Browser, ConsoleMessage, ConsoleMessageLocation, ElementHandle, Page} from "puppeteer";
|
import type {Browser, ConsoleMessage, ConsoleMessageLocation, ElementHandle, Page} from "puppeteer";
|
||||||
|
@ -11,7 +12,7 @@ import StackTraceGPS from "stacktrace-gps";
|
||||||
|
|
||||||
import {test_credentials} from "../../../var/puppeteer/test_credentials.js";
|
import {test_credentials} from "../../../var/puppeteer/test_credentials.js";
|
||||||
|
|
||||||
const root_dir = path.resolve(__dirname, "../../..");
|
const root_dir = url.fileURLToPath(new URL("../../..", import.meta.url));
|
||||||
const puppeteer_dir = path.join(root_dir, "var/puppeteer");
|
const puppeteer_dir = path.join(root_dir, "var/puppeteer");
|
||||||
|
|
||||||
type Message = Record<string, string | boolean> & {
|
type Message = Record<string, string | boolean> & {
|
||||||
|
|
Loading…
Reference in New Issue